From dfe944a971512f413fc3c74ca8066ee7a70f6d5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Mon, 11 Feb 2002 18:45:36 +0100
Subject: [PATCH] (_NETTLE_CIPHER_FIX): New macro, suitable for ciphers with a
 fixed key size.

Rev: src/nettle/nettle-meta.h:1.5
---
 nettle-meta.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/nettle-meta.h b/nettle-meta.h
index 8283ed52..008047a1 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;
-- 
GitLab