From: Niels Möller Date: Wed, 13 Feb 2002 23:15:11 +0000 (+0100) Subject: (_NETTLE_CIPHER_SEP): New macro, useful for X-Git-Tag: nettle_1.6_release_20021003~325 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1c08e8f7d3278146720b3a9712057346c38b82d;p=thirdparty%2Fnettle.git (_NETTLE_CIPHER_SEP): New macro, useful for algorithms with separate encyption and decryption key setup. Rev: src/nettle/nettle-meta.h:1.6 --- 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), \