]> pd.if.org Git - zpackage/blob - crypt/crypt_register_all_hashes.c
remove stray debug fprintf
[zpackage] / crypt / crypt_register_all_hashes.c
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
2  *
3  * LibTomCrypt is a library that provides various cryptographic
4  * algorithms in a highly modular and flexible manner.
5  *
6  * The library is free for all purposes without any express
7  * guarantee it works.
8  */
9
10 #include "tomcrypt.h"
11
12 /**
13   @file crypt_register_all_hashes.c
14
15   Steffen Jaeckel
16 */
17
18 #define REGISTER_HASH(h) do {\
19    LTC_ARGCHK(register_hash(h) != -1); \
20 } while(0)
21
22 int register_all_hashes(void)
23 {
24 #ifdef LTC_TIGER
25    REGISTER_HASH(&tiger_desc);
26 #endif
27 #ifdef LTC_MD2
28    REGISTER_HASH(&md2_desc);
29 #endif
30 #ifdef LTC_MD4
31    REGISTER_HASH(&md4_desc);
32 #endif
33 #ifdef LTC_MD5
34    REGISTER_HASH(&md5_desc);
35 #endif
36 #ifdef LTC_SHA1
37    REGISTER_HASH(&sha1_desc);
38 #endif
39 #ifdef LTC_SHA224
40    REGISTER_HASH(&sha224_desc);
41 #endif
42 #ifdef LTC_SHA256
43    REGISTER_HASH(&sha256_desc);
44 #endif
45 #ifdef LTC_SHA384
46    REGISTER_HASH(&sha384_desc);
47 #endif
48 #ifdef LTC_SHA512
49    REGISTER_HASH(&sha512_desc);
50 #endif
51 #ifdef LTC_SHA512_224
52    REGISTER_HASH(&sha512_224_desc);
53 #endif
54 #ifdef LTC_SHA512_256
55    REGISTER_HASH(&sha512_256_desc);
56 #endif
57 #ifdef LTC_SHA3
58    REGISTER_HASH(&sha3_224_desc);
59    REGISTER_HASH(&sha3_256_desc);
60    REGISTER_HASH(&sha3_384_desc);
61    REGISTER_HASH(&sha3_512_desc);
62 #endif
63 #ifdef LTC_RIPEMD128
64    REGISTER_HASH(&rmd128_desc);
65 #endif
66 #ifdef LTC_RIPEMD160
67    REGISTER_HASH(&rmd160_desc);
68 #endif
69 #ifdef LTC_RIPEMD256
70    REGISTER_HASH(&rmd256_desc);
71 #endif
72 #ifdef LTC_RIPEMD320
73    REGISTER_HASH(&rmd320_desc);
74 #endif
75 #ifdef LTC_WHIRLPOOL
76    REGISTER_HASH(&whirlpool_desc);
77 #endif
78 #ifdef LTC_BLAKE2S
79    REGISTER_HASH(&blake2s_128_desc);
80    REGISTER_HASH(&blake2s_160_desc);
81    REGISTER_HASH(&blake2s_224_desc);
82    REGISTER_HASH(&blake2s_256_desc);
83 #endif
84 #ifdef LTC_BLAKE2S
85    REGISTER_HASH(&blake2b_160_desc);
86    REGISTER_HASH(&blake2b_256_desc);
87    REGISTER_HASH(&blake2b_384_desc);
88    REGISTER_HASH(&blake2b_512_desc);
89 #endif
90 #ifdef LTC_CHC_HASH
91    REGISTER_HASH(&chc_desc);
92    LTC_ARGCHK(chc_register(find_cipher_any("aes", 8, 16)) == CRYPT_OK);
93 #endif
94    return CRYPT_OK;
95 }
96
97 /* ref:         $Format:%D$ */
98 /* git commit:  $Format:%H$ */
99 /* commit time: $Format:%ai$ */