mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-05 05:34:41 +02:00
ti-hash.c included in wc_port.c
This commit is contained in:
@@ -29,8 +29,7 @@
|
|||||||
#if !defined(NO_MD5)
|
#if !defined(NO_MD5)
|
||||||
|
|
||||||
#if defined(WOLFSSL_TI_HASH)
|
#if defined(WOLFSSL_TI_HASH)
|
||||||
#define WOLFSSL_TI_MD5
|
/* #include <wolfcrypt/src/port/ti/ti-hash.c> included by wc_port.c */
|
||||||
#include <wolfcrypt/src/port/ti/ti-hash.c>
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef WOLFSSL_PIC32MZ_HASH
|
#ifdef WOLFSSL_PIC32MZ_HASH
|
||||||
|
@@ -144,7 +144,7 @@ static int hashHash(const byte* data, word32 len, byte* hash, word32 algo, word3
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(NO_MD5) && defined(WOLFSSL_TI_MD5)
|
#if !defined(NO_MD5)
|
||||||
WOLFSSL_API void wc_InitMd5(Md5* md5)
|
WOLFSSL_API void wc_InitMd5(Md5* md5)
|
||||||
{
|
{
|
||||||
if (md5 == NULL)
|
if (md5 == NULL)
|
||||||
@@ -175,7 +175,7 @@ WOLFSSL_API int wc_Md5Hash(const byte*data, word32 len, byte*hash)
|
|||||||
|
|
||||||
#endif /* NO_MD5 */
|
#endif /* NO_MD5 */
|
||||||
|
|
||||||
#if !defined(NO_SHA) && defined(WOLFSSL_TI_SHA)
|
#if !defined(NO_SHA)
|
||||||
WOLFSSL_API int wc_InitSha(Sha* sha)
|
WOLFSSL_API int wc_InitSha(Sha* sha)
|
||||||
{
|
{
|
||||||
if (sha == NULL)
|
if (sha == NULL)
|
||||||
@@ -206,7 +206,7 @@ WOLFSSL_API int wc_ShaHash(const byte*data, word32 len, byte*hash)
|
|||||||
|
|
||||||
#endif /* NO_SHA */
|
#endif /* NO_SHA */
|
||||||
|
|
||||||
#if defined(HAVE_SHA224) && defined(WOLFSSL_TI_SHA224)
|
#if defined(HAVE_SHA224)
|
||||||
WOLFSSL_API int wc_InitSha224(Sha224* sha224)
|
WOLFSSL_API int wc_InitSha224(Sha224* sha224)
|
||||||
{
|
{
|
||||||
if (sha224 == NULL)
|
if (sha224 == NULL)
|
||||||
@@ -237,7 +237,7 @@ WOLFSSL_API int wc_Sha224Hash(const byte* data, word32 len, byte*hash)
|
|||||||
|
|
||||||
#endif /* HAVE_SHA224 */
|
#endif /* HAVE_SHA224 */
|
||||||
|
|
||||||
#if !defined(NO_SHA256) && defined(WOLFSSL_TI_SHA256)
|
#if !defined(NO_SHA256)
|
||||||
WOLFSSL_API int wc_InitSha256(Sha256* sha256)
|
WOLFSSL_API int wc_InitSha256(Sha256* sha256)
|
||||||
{
|
{
|
||||||
if (sha256 == NULL)
|
if (sha256 == NULL)
|
||||||
|
@@ -65,8 +65,7 @@
|
|||||||
#else /* else build without fips */
|
#else /* else build without fips */
|
||||||
|
|
||||||
#if defined(WOLFSSL_TI_HASH)
|
#if defined(WOLFSSL_TI_HASH)
|
||||||
#define WOLFSSL_TI_SHA
|
/* #include <wolfcrypt/src/port/ti/ti-hash.c> included by wc_port.c */
|
||||||
#include <wolfcrypt/src/port/ti/ti-hash.c>
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef WOLFSSL_PIC32MZ_HASH
|
#ifdef WOLFSSL_PIC32MZ_HASH
|
||||||
|
@@ -57,11 +57,7 @@ int wc_Sha256Hash(const byte* data, word32 len, byte* out)
|
|||||||
#else /* else build without fips */
|
#else /* else build without fips */
|
||||||
|
|
||||||
#if !defined(NO_SHA256) && defined(WOLFSSL_TI_HASH)
|
#if !defined(NO_SHA256) && defined(WOLFSSL_TI_HASH)
|
||||||
#define WOLFSSL_TI_SHA256
|
/* #include <wolfcrypt/src/port/ti/ti-hash.c> included by wc_port.c */
|
||||||
#ifdef HAVE_SHA224
|
|
||||||
#define WOLFSSL_TI_SHA224
|
|
||||||
#endif
|
|
||||||
#include <wolfcrypt/src/port/ti/ti-hash.c>
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if !defined (ALIGN32)
|
#if !defined (ALIGN32)
|
||||||
|
@@ -651,5 +651,6 @@ int UnLockMutex(wolfSSL_Mutex *m)
|
|||||||
#endif /* SINGLE_THREADED */
|
#endif /* SINGLE_THREADED */
|
||||||
|
|
||||||
#if defined(WOLFSSL_TI_CRYPT) || defined(WOLFSSL_TI_HASH)
|
#if defined(WOLFSSL_TI_CRYPT) || defined(WOLFSSL_TI_HASH)
|
||||||
#include <wolfcrypt/src/port/ti/ti-ccm.c> /* initialize and Mutex for TI Crypt Engine */
|
#include <wolfcrypt/src/port/ti/ti-ccm.c> /* initialize and Mutex for TI Crypt Engine */
|
||||||
|
#include <wolfcrypt/src/port/ti/ti-hash.c> /* md5, sha1, sha224, sha256 */
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user