ti-hash.c included in wc_port.c

This commit is contained in:
Takashi Kojo
2015-06-01 14:32:36 +09:00
parent e4580c3461
commit 644f7a4cdb
5 changed files with 9 additions and 14 deletions

View File

@@ -29,8 +29,7 @@
#if !defined(NO_MD5)
#if defined(WOLFSSL_TI_HASH)
#define WOLFSSL_TI_MD5
#include <wolfcrypt/src/port/ti/ti-hash.c>
/* #include <wolfcrypt/src/port/ti/ti-hash.c> included by wc_port.c */
#else
#ifdef WOLFSSL_PIC32MZ_HASH

View File

@@ -144,7 +144,7 @@ static int hashHash(const byte* data, word32 len, byte* hash, word32 algo, word3
return ret;
}
#if !defined(NO_MD5) && defined(WOLFSSL_TI_MD5)
#if !defined(NO_MD5)
WOLFSSL_API void wc_InitMd5(Md5* md5)
{
if (md5 == NULL)
@@ -175,7 +175,7 @@ WOLFSSL_API int wc_Md5Hash(const byte*data, word32 len, byte*hash)
#endif /* NO_MD5 */
#if !defined(NO_SHA) && defined(WOLFSSL_TI_SHA)
#if !defined(NO_SHA)
WOLFSSL_API int wc_InitSha(Sha* sha)
{
if (sha == NULL)
@@ -206,7 +206,7 @@ WOLFSSL_API int wc_ShaHash(const byte*data, word32 len, byte*hash)
#endif /* NO_SHA */
#if defined(HAVE_SHA224) && defined(WOLFSSL_TI_SHA224)
#if defined(HAVE_SHA224)
WOLFSSL_API int wc_InitSha224(Sha224* sha224)
{
if (sha224 == NULL)
@@ -237,7 +237,7 @@ WOLFSSL_API int wc_Sha224Hash(const byte* data, word32 len, byte*hash)
#endif /* HAVE_SHA224 */
#if !defined(NO_SHA256) && defined(WOLFSSL_TI_SHA256)
#if !defined(NO_SHA256)
WOLFSSL_API int wc_InitSha256(Sha256* sha256)
{
if (sha256 == NULL)

View File

@@ -65,8 +65,7 @@
#else /* else build without fips */
#if defined(WOLFSSL_TI_HASH)
#define WOLFSSL_TI_SHA
#include <wolfcrypt/src/port/ti/ti-hash.c>
/* #include <wolfcrypt/src/port/ti/ti-hash.c> included by wc_port.c */
#else
#ifdef WOLFSSL_PIC32MZ_HASH

View File

@@ -57,11 +57,7 @@ int wc_Sha256Hash(const byte* data, word32 len, byte* out)
#else /* else build without fips */
#if !defined(NO_SHA256) && defined(WOLFSSL_TI_HASH)
#define WOLFSSL_TI_SHA256
#ifdef HAVE_SHA224
#define WOLFSSL_TI_SHA224
#endif
#include <wolfcrypt/src/port/ti/ti-hash.c>
/* #include <wolfcrypt/src/port/ti/ti-hash.c> included by wc_port.c */
#else
#if !defined (ALIGN32)

View File

@@ -651,5 +651,6 @@ int UnLockMutex(wolfSSL_Mutex *m)
#endif /* SINGLE_THREADED */
#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