summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-02-06 14:19:20 +0100
committerNiels Möller <nisse@lysator.liu.se>2014-02-06 14:19:20 +0100
commit62e582899298d127a97ce5d5fd3fdb31d2974263 (patch)
treea619e8cd2c1bacf39401a16f4ef3a887243914f4
parenta495057f8e54cf0d79e3fd53e25146b9eb8803ca (diff)
downloadnettle-62e582899298d127a97ce5d5fd3fdb31d2974263.tar.gz
Deleted _NETTLE_CIPHER_FIX.
-rw-r--r--ChangeLog7
-rw-r--r--cast128-meta.c10
-rw-r--r--nettle-meta.h11
3 files changed, 13 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 0fc58f61..43dec6d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,10 @@
2014-02-06 Niels Möller <nisse@lysator.liu.se>
- * nettle-meta.h (_NETTLE_CIPHER_SEP, _NETTLE_CIPHER_SEP_SET_KEY):
- Deleted unused macros.
+ * cast128-meta.c (nettle_cast128): Deleted only use of
+ _NETTLE_CIPHER_FIX.
+
+ * nettle-meta.h (_NETTLE_CIPHER_SEP, _NETTLE_CIPHER_SEP_SET_KEY)
+ (_NETTLE_CIPHER_FIX): Deleted unused macros.
* examples/nettle-benchmark.c (time_cipher): Fixed memset calls.
diff --git a/cast128-meta.c b/cast128-meta.c
index 692b1b24..e103d7b3 100644
--- a/cast128-meta.c
+++ b/cast128-meta.c
@@ -28,5 +28,11 @@
#include "cast128.h"
-const struct nettle_cipher nettle_cast128
-= _NETTLE_CIPHER_FIX(cast128, CAST128);
+const struct nettle_cipher nettle_cast128 =
+ { "cast128", sizeof(struct cast128_ctx),
+ CAST128_BLOCK_SIZE, CAST128_KEY_SIZE,
+ (nettle_set_key_func *) cast128_set_key,
+ (nettle_set_key_func *) cast128_set_key,
+ (nettle_crypt_func *) cast128_encrypt,
+ (nettle_crypt_func *) cast128_decrypt
+ };
diff --git a/nettle-meta.h b/nettle-meta.h
index bac38353..8e08cb76 100644
--- a/nettle-meta.h
+++ b/nettle-meta.h
@@ -63,17 +63,6 @@ struct nettle_cipher
(nettle_crypt_func *) name##_decrypt, \
}
-#define _NETTLE_CIPHER_FIX(name, NAME) { \
- #name, \
- sizeof(struct name##_ctx), \
- NAME##_BLOCK_SIZE, \
- NAME##_KEY_SIZE, \
- (nettle_set_key_func *) name##_set_key, \
- (nettle_set_key_func *) name##_set_key, \
- (nettle_crypt_func *) name##_encrypt, \
- (nettle_crypt_func *) name##_decrypt, \
-}
-
/* null-terminated list of ciphers implemented by this version of nettle */
extern const struct nettle_cipher * const nettle_ciphers[];