Commit dfe944a9 authored by Niels Möller's avatar Niels Möller

(_NETTLE_CIPHER_FIX): New macro, suitable for

ciphers with a fixed key size.

Rev: src/nettle/nettle-meta.h:1.5
parent f6ad3413
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment