From a1c08e8f7d3278146720b3a9712057346c38b82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Thu, 14 Feb 2002 00:15:11 +0100 Subject: [PATCH] (_NETTLE_CIPHER_SEP): New macro, useful for algorithms with separate encyption and decryption key setup. Rev: src/nettle/nettle-meta.h:1.6 --- nettle-meta.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nettle-meta.h b/nettle-meta.h index 008047a1..b5375a85 100644 --- a/nettle-meta.h +++ b/nettle-meta.h @@ -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), \ -- GitLab