add blake2s to various places.

This commit is contained in:
Kelvin Sherlock 2017-04-07 20:50:28 -04:00
parent 68296e0608
commit 647b53d880
3 changed files with 18 additions and 0 deletions

View File

@ -180,6 +180,9 @@ const char *crypt_build_settings =
#if defined(LTC_WHIRLPOOL) #if defined(LTC_WHIRLPOOL)
" WHIRLPOOL\n" " WHIRLPOOL\n"
#endif #endif
#if defined(LTC_BLAKE2S)
" BLAKE2S\n"
#endif
#if defined(LTC_CHC_HASH) #if defined(LTC_CHC_HASH)
" CHC_HASH\n" " CHC_HASH\n"
#endif #endif

View File

@ -71,6 +71,9 @@ static const crypt_size _crypt_sizes[] = {
#ifdef LTC_TIGER #ifdef LTC_TIGER
_SZ_STRINGIFY_S(tiger_state), _SZ_STRINGIFY_S(tiger_state),
#endif #endif
#ifdef LTC_BLAKE2S
_SZ_STRINGIFY_S(blake2s_state),
#endif
#ifdef LTC_CHC_HASH #ifdef LTC_CHC_HASH
_SZ_STRINGIFY_S(chc_state), _SZ_STRINGIFY_S(chc_state),
#endif #endif

View File

@ -319,6 +319,12 @@ static void _unregister_all(void)
#ifdef LTC_WHIRLPOOL #ifdef LTC_WHIRLPOOL
unregister_hash(&whirlpool_desc); unregister_hash(&whirlpool_desc);
#endif #endif
#ifdef LTC_BLAKE2S
unregister_hash(&blake2s_128_desc);
unregister_hash(&blake2s_160_desc);
unregister_hash(&blake2s_224_desc);
unregister_hash(&blake2s_256_desc);
#endif
#ifdef LTC_CHC_HASH #ifdef LTC_CHC_HASH
unregister_hash(&chc_desc); unregister_hash(&chc_desc);
#endif #endif
@ -481,6 +487,12 @@ void reg_algs(void)
#ifdef LTC_WHIRLPOOL #ifdef LTC_WHIRLPOOL
register_hash (&whirlpool_desc); register_hash (&whirlpool_desc);
#endif #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_CHC_HASH #ifdef LTC_CHC_HASH
register_hash(&chc_desc); register_hash(&chc_desc);
if ((err = chc_register(register_cipher(&aes_desc))) != CRYPT_OK) { if ((err = chc_register(register_cipher(&aes_desc))) != CRYPT_OK) {