forked from wolfSSL/wolfssl
TI hash option control in hash.c
This commit is contained in:
@ -25,19 +25,21 @@
|
|||||||
|
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
|
|
||||||
#if !defined(NO_MD5) && !defined(WOLFSSL_TI_HASH)
|
#if !defined(WOLFSSL_TI_HASH)
|
||||||
|
|
||||||
|
#if !defined(NO_MD5)
|
||||||
#include <wolfssl/wolfcrypt/md5.h>
|
#include <wolfssl/wolfcrypt/md5.h>
|
||||||
#endif
|
#endif
|
||||||
#if !defined(NO_SHA) && !defined(WOLFSSL_TI_HASH)
|
#if !defined(NO_SHA)
|
||||||
#include <wolfssl/wolfcrypt/sha.h>
|
#include <wolfssl/wolfcrypt/sha.h>
|
||||||
#endif
|
#endif
|
||||||
#if !defined(NO_SHA256) && !defined(WOLFSSL_TI_HASH)
|
#if !defined(NO_SHA256)
|
||||||
#include <wolfssl/wolfcrypt/sha256.h>
|
#include <wolfssl/wolfcrypt/sha256.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/hash.h>
|
#include <wolfssl/wolfcrypt/hash.h>
|
||||||
|
|
||||||
#if !defined(NO_MD5) && !defined(WOLFSSL_TI_HASH)
|
#if !defined(NO_MD5)
|
||||||
void wc_Md5GetHash(Md5* md5, byte* hash)
|
void wc_Md5GetHash(Md5* md5, byte* hash)
|
||||||
{
|
{
|
||||||
Md5 save = *md5 ;
|
Md5 save = *md5 ;
|
||||||
@ -46,7 +48,7 @@ void wc_Md5GetHash(Md5* md5, byte* hash)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(NO_SHA) && !defined(WOLFSSL_TI_HASH)
|
#if !defined(NO_SHA)
|
||||||
int wc_ShaGetHash(Sha* sha, byte* hash)
|
int wc_ShaGetHash(Sha* sha, byte* hash)
|
||||||
{
|
{
|
||||||
int ret ;
|
int ret ;
|
||||||
@ -57,7 +59,7 @@ int wc_ShaGetHash(Sha* sha, byte* hash)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(NO_SHA256) && !defined(WOLFSSL_TI_HASH)
|
#if !defined(NO_SHA256)
|
||||||
int wc_Sha256GetHash(Sha256* sha256, byte* hash)
|
int wc_Sha256GetHash(Sha256* sha256, byte* hash)
|
||||||
{
|
{
|
||||||
int ret ;
|
int ret ;
|
||||||
@ -67,3 +69,6 @@ int wc_Sha256GetHash(Sha256* sha256, byte* hash)
|
|||||||
return ret ;
|
return ret ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user