chiark / gitweb /
hbytes and crypto compile now
[chiark-tcl.git] / crypto / algtables.c
index bb111de..ea591fb 100644 (file)
@@ -1,11 +1,7 @@
 /*
  */
 
-#include <stdint.h>
-#include <stddef.h>
-#include <netinet/in.h>
-
-#include "hbytes.h"
+#include "chiark_tcl_crypto.h"
 
 #include <nettle/md5.h>
 #include <nettle/sha.h>
@@ -17,9 +13,9 @@
 #define NETTLE_BLOCKCIPHERS                    \
   DO(serpent,  SERPENT)                                \
   DO(twofish,  TWOFISH)                                \
-  DO(aes,      AES)                            \
+/* DO(aes,      AES) */                                \
   DO(blowfish, BLOWFISH)                       \
-  ALIAS(rijndael, aes, AES)
+  /*  ALIAS(rijndael, aes, AES)*/
 
 #define ALIAS(alias,name,NAME)
 #define DO(name,NAME)                                                        \
@@ -36,7 +32,7 @@
 #undef DO
 #undef ALIAS
 
-const BlockCipherAlgInfo blockcipheralginfos[]= {
+const BlockCipherAlgInfo cht_blockcipheralginfo_entries[]= {
 #define ALIAS(alias,name,NAME)                                 \
   { #alias, NAME##_BLOCK_SIZE, sizeof(struct name##_ctx),      \
        NAME##_MIN_KEY_SIZE, NAME##_MAX_KEY_SIZE,               \
@@ -50,7 +46,7 @@ const BlockCipherAlgInfo blockcipheralginfos[]= {
   { 0 }
 };
 
-const BlockCipherPropInfo blockcipherpropinfos[]= {
+const BlockCipherPropInfo cht_blockcipherpropinfo_entries[]= {
   { "blocklen",  offsetof(BlockCipherAlgInfo, blocksize) },
   { "minkeylen", offsetof(BlockCipherAlgInfo, key_min)   },
   { "maxkeylen", offsetof(BlockCipherAlgInfo, key_max)   },
@@ -81,13 +77,13 @@ const BlockCipherPropInfo blockcipherpropinfos[]= {
   NETTLE_DIGESTS
 #undef DO
 
-const HashAlgPropInfo hashalgpropinfos[]= {
+const HashAlgPropInfo cht_hashalgpropinfo_entries[]= {
   { "hashlen",  offsetof(HashAlgInfo, hashsize)  },
   { "blocklen", offsetof(HashAlgInfo, blocksize) },
   { 0 }
 };
 
-const HashAlgInfo hashalginfos[]= {
+const HashAlgInfo cht_hashalginfo_entries[]= {
 #define DO(name,NAME)                                                      \
   { #name, NAME##_DIGEST_SIZE, NAME##_DATA_SIZE, sizeof(struct name##_ctx), \
     alg_##name##_init, alg_##name##_update, alg_##name##_final,                    \