mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-15 01:07:58 -05:00
Import code from previous AssetBuilder version
This commit is contained in:
99
thirdparty/libtomcrypt/misc/crypt/crypt_register_all_hashes.c
vendored
Normal file
99
thirdparty/libtomcrypt/misc/crypt/crypt_register_all_hashes.c
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
@file crypt_register_all_hashes.c
|
||||
|
||||
Steffen Jaeckel
|
||||
*/
|
||||
|
||||
#define REGISTER_HASH(h) do {\
|
||||
LTC_ARGCHK(register_hash(h) != -1); \
|
||||
} while(0)
|
||||
|
||||
int register_all_hashes(void)
|
||||
{
|
||||
#ifdef LTC_TIGER
|
||||
REGISTER_HASH(&tiger_desc);
|
||||
#endif
|
||||
#ifdef LTC_MD2
|
||||
REGISTER_HASH(&md2_desc);
|
||||
#endif
|
||||
#ifdef LTC_MD4
|
||||
REGISTER_HASH(&md4_desc);
|
||||
#endif
|
||||
#ifdef LTC_MD5
|
||||
REGISTER_HASH(&md5_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA1
|
||||
REGISTER_HASH(&sha1_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA224
|
||||
REGISTER_HASH(&sha224_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA256
|
||||
REGISTER_HASH(&sha256_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA384
|
||||
REGISTER_HASH(&sha384_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA512
|
||||
REGISTER_HASH(&sha512_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA512_224
|
||||
REGISTER_HASH(&sha512_224_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA512_256
|
||||
REGISTER_HASH(&sha512_256_desc);
|
||||
#endif
|
||||
#ifdef LTC_SHA3
|
||||
REGISTER_HASH(&sha3_224_desc);
|
||||
REGISTER_HASH(&sha3_256_desc);
|
||||
REGISTER_HASH(&sha3_384_desc);
|
||||
REGISTER_HASH(&sha3_512_desc);
|
||||
#endif
|
||||
#ifdef LTC_RIPEMD128
|
||||
REGISTER_HASH(&rmd128_desc);
|
||||
#endif
|
||||
#ifdef LTC_RIPEMD160
|
||||
REGISTER_HASH(&rmd160_desc);
|
||||
#endif
|
||||
#ifdef LTC_RIPEMD256
|
||||
REGISTER_HASH(&rmd256_desc);
|
||||
#endif
|
||||
#ifdef LTC_RIPEMD320
|
||||
REGISTER_HASH(&rmd320_desc);
|
||||
#endif
|
||||
#ifdef LTC_WHIRLPOOL
|
||||
REGISTER_HASH(&whirlpool_desc);
|
||||
#endif
|
||||
#ifdef LTC_BLAKE2S
|
||||
REGISTER_HASH(&blake2s_128_desc);
|
||||
REGISTER_HASH(&blake2s_160_desc);
|
||||
REGISTER_HASH(&blake2s_224_desc);
|
||||
REGISTER_HASH(&blake2s_256_desc);
|
||||
#endif
|
||||
#ifdef LTC_BLAKE2S
|
||||
REGISTER_HASH(&blake2b_160_desc);
|
||||
REGISTER_HASH(&blake2b_256_desc);
|
||||
REGISTER_HASH(&blake2b_384_desc);
|
||||
REGISTER_HASH(&blake2b_512_desc);
|
||||
#endif
|
||||
#ifdef LTC_CHC_HASH
|
||||
REGISTER_HASH(&chc_desc);
|
||||
LTC_ARGCHK(chc_register(find_cipher_any("aes", 8, 16)) == CRYPT_OK);
|
||||
#endif
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
Reference in New Issue
Block a user