diff --git a/nettle-meta.h b/nettle-meta.h index 8283ed525d6a3b53850ea02d76b017427b2e70bf..008047a1999976cc8cae50974f37cce72ea4b937 100644 --- a/nettle-meta.h +++ b/nettle-meta.h @@ -67,7 +67,18 @@ struct nettle_cipher (nettle_crypt_func) name##_encrypt, \ (nettle_crypt_func) name##_decrypt, \ } - + +#define _NETTLE_CIPHER_FIX(name, NAME, keysize) { \ + #name, \ + sizeof(struct name##_ctx), \ + NAME##_BLOCK_SIZE, \ + keysize / 8, \ + (nettle_set_key_func) name##_set_key, \ + (nettle_set_key_func) name##_set_key, \ + (nettle_crypt_func) name##_encrypt, \ + (nettle_crypt_func) name##_decrypt, \ +} + extern const struct nettle_cipher nettle_aes128; extern const struct nettle_cipher nettle_aes192; extern const struct nettle_cipher nettle_aes256;