]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(_NETTLE_CIPHER_SEP): New macro, useful for
authorNiels Möller <nisse@lysator.liu.se>
Wed, 13 Feb 2002 23:15:11 +0000 (00:15 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 13 Feb 2002 23:15:11 +0000 (00:15 +0100)
algorithms with separate encyption and decryption key setup.

Rev: src/nettle/nettle-meta.h:1.6

nettle-meta.h

index 008047a1999976cc8cae50974f37cce72ea4b937..b5375a853792d2042fbe1c906040ea8e78aa8b4d 100644 (file)
@@ -68,6 +68,17 @@ struct nettle_cipher
   (nettle_crypt_func) name##_decrypt,          \
 }
 
+#define _NETTLE_CIPHER_SEP(name, NAME, keysize) {      \
+  #name #keysize,                              \
+  sizeof(struct name##_ctx),                   \
+  NAME##_BLOCK_SIZE,                           \
+  keysize / 8,                                 \
+  (nettle_set_key_func) name##_set_encrypt_key,        \
+  (nettle_set_key_func) name##_set_decrypt_key,        \
+  (nettle_crypt_func) name##_encrypt,          \
+  (nettle_crypt_func) name##_decrypt,          \
+}
+
 #define _NETTLE_CIPHER_FIX(name, NAME, keysize) {      \
   #name,                                       \
   sizeof(struct name##_ctx),                   \