diff options
Diffstat (limited to 'libtomcrypt/src/headers/tomcrypt_hash.h')
-rw-r--r-- | libtomcrypt/src/headers/tomcrypt_hash.h | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt_hash.h b/libtomcrypt/src/headers/tomcrypt_hash.h index d9916ac..56b272a 100644 --- a/libtomcrypt/src/headers/tomcrypt_hash.h +++ b/libtomcrypt/src/headers/tomcrypt_hash.h @@ -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 @@ struct sha512_state { }; #endif -#ifdef SHA256 +#ifdef LTC_SHA256 struct sha256_state { ulong64 length; ulong32 state[8], curlen; @@ -15,7 +15,7 @@ struct sha256_state { }; #endif -#ifdef SHA1 +#ifdef LTC_SHA1 struct sha1_state { ulong64 length; ulong32 state[5], curlen; @@ -23,7 +23,7 @@ struct sha1_state { }; #endif -#ifdef MD5 +#ifdef LTC_MD5 struct md5_state { ulong64 length; ulong32 state[4], curlen; @@ -31,7 +31,7 @@ struct md5_state { }; #endif -#ifdef MD4 +#ifdef LTC_MD4 struct md4_state { ulong64 length; ulong32 state[4], curlen; @@ -39,7 +39,7 @@ struct md4_state { }; #endif -#ifdef TIGER +#ifdef LTC_TIGER struct tiger_state { ulong64 state[3], length; unsigned long curlen; @@ -47,14 +47,14 @@ struct tiger_state { }; #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 @@ struct rmd128_state { }; #endif -#ifdef RIPEMD160 +#ifdef LTC_RIPEMD160 struct rmd160_state { ulong64 length; unsigned char buf[64]; @@ -70,7 +70,7 @@ struct rmd160_state { }; #endif -#ifdef RIPEMD256 +#ifdef LTC_RIPEMD256 struct rmd256_state { ulong64 length; unsigned char buf[64]; @@ -78,7 +78,7 @@ struct rmd256_state { }; #endif -#ifdef RIPEMD320 +#ifdef LTC_RIPEMD320 struct rmd320_state { ulong64 length; unsigned char buf[64]; @@ -86,7 +86,7 @@ struct rmd320_state { }; #endif -#ifdef WHIRLPOOL +#ifdef LTC_WHIRLPOOL struct whirlpool_state { ulong64 length, state[8]; unsigned char buf[64]; @@ -94,7 +94,7 @@ struct whirlpool_state { }; #endif -#ifdef CHC_HASH +#ifdef LTC_CHC_HASH struct chc_state { ulong64 length; unsigned char state[MAXBLOCKSIZE], buf[MAXBLOCKSIZE]; @@ -104,43 +104,43 @@ struct chc_state { 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 @@ extern struct ltc_hash_descriptor { } 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 @@ int chc_test(void); 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 @@ int whirlpool_test(void); 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 @@ int sha512_test(void); 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 @@ int sha384_test(void); 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 @@ extern const struct ltc_hash_descriptor sha224_desc; #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 @@ int sha1_test(void); 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 @@ int md5_test(void); 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 @@ int md4_test(void); 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 @@ int md2_test(void); 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 @@ int tiger_test(void); 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 @@ int rmd128_test(void); 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 @@ int rmd160_test(void); 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 @@ int rmd256_test(void); 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 @@ int func_name (hash_state * md, const unsigned char *in, unsigned long inlen) 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$ */ |