diff libtomcrypt/src/headers/tomcrypt_hash.h @ 1435:f849a5ca2efc

update to libtomcrypt 1.17 (with Dropbear changes)
author Matt Johnston <matt@ucc.asn.au>
date Sat, 24 Jun 2017 17:50:50 +0800
parents 0cbe8f6dbf9e
children 6dba84798cd5
line wrap: on
line diff
--- a/libtomcrypt/src/headers/tomcrypt_hash.h	Sat Jun 24 11:53:32 2017 +0800
+++ b/libtomcrypt/src/headers/tomcrypt_hash.h	Sat Jun 24 17:50:50 2017 +0800
@@ -1,5 +1,5 @@
 /* ---- HASH FUNCTIONS ---- */
-#ifdef SHA512
+#ifdef LTC_SHA512
 struct sha512_state {
     ulong64  length, state[8];
     unsigned long curlen;
@@ -7,7 +7,7 @@
 };
 #endif
 
-#ifdef SHA256
+#ifdef LTC_SHA256
 struct sha256_state {
     ulong64 length;
     ulong32 state[8], curlen;
@@ -15,7 +15,7 @@
 };
 #endif
 
-#ifdef SHA1
+#ifdef LTC_SHA1
 struct sha1_state {
     ulong64 length;
     ulong32 state[5], curlen;
@@ -23,7 +23,7 @@
 };
 #endif
 
-#ifdef MD5
+#ifdef LTC_MD5
 struct md5_state {
     ulong64 length;
     ulong32 state[4], curlen;
@@ -31,7 +31,7 @@
 };
 #endif
 
-#ifdef MD4
+#ifdef LTC_MD4
 struct md4_state {
     ulong64 length;
     ulong32 state[4], curlen;
@@ -39,7 +39,7 @@
 };
 #endif
 
-#ifdef TIGER
+#ifdef LTC_TIGER
 struct tiger_state {
     ulong64 state[3], length;
     unsigned long curlen;
@@ -47,14 +47,14 @@
 };
 #endif
 
-#ifdef MD2
+#ifdef LTC_MD2
 struct md2_state {
     unsigned char chksum[16], X[48], buf[16];
     unsigned long curlen;
 };
 #endif
 
-#ifdef RIPEMD128
+#ifdef LTC_RIPEMD128
 struct rmd128_state {
     ulong64 length;
     unsigned char buf[64];
@@ -62,7 +62,7 @@
 };
 #endif
 
-#ifdef RIPEMD160
+#ifdef LTC_RIPEMD160
 struct rmd160_state {
     ulong64 length;
     unsigned char buf[64];
@@ -70,7 +70,7 @@
 };
 #endif
 
-#ifdef RIPEMD256
+#ifdef LTC_RIPEMD256
 struct rmd256_state {
     ulong64 length;
     unsigned char buf[64];
@@ -78,7 +78,7 @@
 };
 #endif
 
-#ifdef RIPEMD320
+#ifdef LTC_RIPEMD320
 struct rmd320_state {
     ulong64 length;
     unsigned char buf[64];
@@ -86,7 +86,7 @@
 };
 #endif
 
-#ifdef WHIRLPOOL
+#ifdef LTC_WHIRLPOOL
 struct whirlpool_state {
     ulong64 length, state[8];
     unsigned char buf[64];
@@ -94,7 +94,7 @@
 };
 #endif
 
-#ifdef CHC_HASH
+#ifdef LTC_CHC_HASH
 struct chc_state {
     ulong64 length;
     unsigned char state[MAXBLOCKSIZE], buf[MAXBLOCKSIZE];
@@ -104,43 +104,43 @@
 
 typedef union Hash_state {
     char dummy[1];
-#ifdef CHC_HASH
+#ifdef LTC_CHC_HASH
     struct chc_state chc;
 #endif
-#ifdef WHIRLPOOL
+#ifdef LTC_WHIRLPOOL
     struct whirlpool_state whirlpool;
 #endif
-#ifdef SHA512
+#ifdef LTC_SHA512
     struct sha512_state sha512;
 #endif
-#ifdef SHA256
+#ifdef LTC_SHA256
     struct sha256_state sha256;
 #endif
-#ifdef SHA1
+#ifdef LTC_SHA1
     struct sha1_state   sha1;
 #endif
-#ifdef MD5
+#ifdef LTC_MD5
     struct md5_state    md5;
 #endif
-#ifdef MD4
+#ifdef LTC_MD4
     struct md4_state    md4;
 #endif
-#ifdef MD2
+#ifdef LTC_MD2
     struct md2_state    md2;
 #endif
-#ifdef TIGER
+#ifdef LTC_TIGER
     struct tiger_state  tiger;
 #endif
-#ifdef RIPEMD128
+#ifdef LTC_RIPEMD128
     struct rmd128_state rmd128;
 #endif
-#ifdef RIPEMD160
+#ifdef LTC_RIPEMD160
     struct rmd160_state rmd160;
 #endif
-#ifdef RIPEMD256
+#ifdef LTC_RIPEMD256
     struct rmd256_state rmd256;
 #endif
-#ifdef RIPEMD320
+#ifdef LTC_RIPEMD320
     struct rmd320_state rmd320;
 #endif
     void *data;
@@ -191,7 +191,7 @@
 
 } hash_descriptor[];
 
-#ifdef CHC_HASH
+#ifdef LTC_CHC_HASH
 int chc_register(int cipher);
 int chc_init(hash_state * md);
 int chc_process(hash_state * md, const unsigned char *in, unsigned long inlen);
@@ -200,7 +200,7 @@
 extern const struct ltc_hash_descriptor chc_desc;
 #endif
 
-#ifdef WHIRLPOOL
+#ifdef LTC_WHIRLPOOL
 int whirlpool_init(hash_state * md);
 int whirlpool_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int whirlpool_done(hash_state * md, unsigned char *hash);
@@ -208,7 +208,7 @@
 extern const struct ltc_hash_descriptor whirlpool_desc;
 #endif
 
-#ifdef SHA512
+#ifdef LTC_SHA512
 int sha512_init(hash_state * md);
 int sha512_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int sha512_done(hash_state * md, unsigned char *hash);
@@ -216,9 +216,9 @@
 extern const struct ltc_hash_descriptor sha512_desc;
 #endif
 
-#ifdef SHA384
-#ifndef SHA512
-   #error SHA512 is required for SHA384
+#ifdef LTC_SHA384
+#ifndef LTC_SHA512
+   #error LTC_SHA512 is required for LTC_SHA384
 #endif
 int sha384_init(hash_state * md);
 #define sha384_process sha512_process
@@ -227,16 +227,16 @@
 extern const struct ltc_hash_descriptor sha384_desc;
 #endif
 
-#ifdef SHA256
+#ifdef LTC_SHA256
 int sha256_init(hash_state * md);
 int sha256_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int sha256_done(hash_state * md, unsigned char *hash);
 int sha256_test(void);
 extern const struct ltc_hash_descriptor sha256_desc;
 
-#ifdef SHA224
-#ifndef SHA256
-   #error SHA256 is required for SHA224
+#ifdef LTC_SHA224
+#ifndef LTC_SHA256
+   #error LTC_SHA256 is required for LTC_SHA224
 #endif
 int sha224_init(hash_state * md);
 #define sha224_process sha256_process
@@ -246,7 +246,7 @@
 #endif
 #endif
 
-#ifdef SHA1
+#ifdef LTC_SHA1
 int sha1_init(hash_state * md);
 int sha1_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int sha1_done(hash_state * md, unsigned char *hash);
@@ -254,7 +254,7 @@
 extern const struct ltc_hash_descriptor sha1_desc;
 #endif
 
-#ifdef MD5
+#ifdef LTC_MD5
 int md5_init(hash_state * md);
 int md5_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int md5_done(hash_state * md, unsigned char *hash);
@@ -262,7 +262,7 @@
 extern const struct ltc_hash_descriptor md5_desc;
 #endif
 
-#ifdef MD4
+#ifdef LTC_MD4
 int md4_init(hash_state * md);
 int md4_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int md4_done(hash_state * md, unsigned char *hash);
@@ -270,7 +270,7 @@
 extern const struct ltc_hash_descriptor md4_desc;
 #endif
 
-#ifdef MD2
+#ifdef LTC_MD2
 int md2_init(hash_state * md);
 int md2_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int md2_done(hash_state * md, unsigned char *hash);
@@ -278,7 +278,7 @@
 extern const struct ltc_hash_descriptor md2_desc;
 #endif
 
-#ifdef TIGER
+#ifdef LTC_TIGER
 int tiger_init(hash_state * md);
 int tiger_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int tiger_done(hash_state * md, unsigned char *hash);
@@ -286,7 +286,7 @@
 extern const struct ltc_hash_descriptor tiger_desc;
 #endif
 
-#ifdef RIPEMD128
+#ifdef LTC_RIPEMD128
 int rmd128_init(hash_state * md);
 int rmd128_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int rmd128_done(hash_state * md, unsigned char *hash);
@@ -294,7 +294,7 @@
 extern const struct ltc_hash_descriptor rmd128_desc;
 #endif
 
-#ifdef RIPEMD160
+#ifdef LTC_RIPEMD160
 int rmd160_init(hash_state * md);
 int rmd160_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int rmd160_done(hash_state * md, unsigned char *hash);
@@ -302,7 +302,7 @@
 extern const struct ltc_hash_descriptor rmd160_desc;
 #endif
 
-#ifdef RIPEMD256
+#ifdef LTC_RIPEMD256
 int rmd256_init(hash_state * md);
 int rmd256_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int rmd256_done(hash_state * md, unsigned char *hash);
@@ -310,7 +310,7 @@
 extern const struct ltc_hash_descriptor rmd256_desc;
 #endif
 
-#ifdef RIPEMD320
+#ifdef LTC_RIPEMD320
 int rmd320_init(hash_state * md);
 int rmd320_process(hash_state * md, const unsigned char *in, unsigned long inlen);
 int rmd320_done(hash_state * md, unsigned char *hash);
@@ -374,6 +374,6 @@
     return CRYPT_OK;                                                                        \
 }
 
-/* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_hash.h,v $ */
-/* $Revision: 1.19 $ */
-/* $Date: 2006/11/05 01:36:43 $ */
+/* $Source$ */
+/* $Revision$ */
+/* $Date$ */