From 3b9ec2c1199fb467f5b60d39626d6204c02db5cb Mon Sep 17 00:00:00 2001 From: toddouska Date: Tue, 18 Aug 2015 12:31:34 -0700 Subject: [PATCH] add extern C to hash.h --- wolfssl/wolfcrypt/hash.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/wolfssl/wolfcrypt/hash.h b/wolfssl/wolfcrypt/hash.h index 50e5d88be..4cdd85f11 100755 --- a/wolfssl/wolfcrypt/hash.h +++ b/wolfssl/wolfcrypt/hash.h @@ -24,6 +24,10 @@ #include +#ifdef __cplusplus + extern "C" { +#endif + #ifndef NO_MD5 #include WOLFSSL_API void wc_Md5GetHash(Md5*, byte*); @@ -63,19 +67,23 @@ WOLFSSL_API int wc_Sha256Hash(const byte*, word32, byte*); #include WOLFSSL_API int wc_Sha512Hash(const byte*, word32, byte*); #if defined(WOLFSSL_TI_HASH) -WOLFSSL_API void wc_Sha512Free(Sha512*); + WOLFSSL_API void wc_Sha512Free(Sha512*); #else -#define wc_Sha512Free(d) + #define wc_Sha512Free(d) #endif #if defined(WOLFSSL_SHA384) WOLFSSL_API int wc_Sha384Hash(const byte*, word32, byte*); #if defined(WOLFSSL_TI_HASH) - WOLFSSL_API void wc_Sha384Free(Sha384*); + WOLFSSL_API void wc_Sha384Free(Sha384*); #else - #define wc_Sha384Free(d) + #define wc_Sha384Free(d) #endif #endif /* defined(WOLFSSL_SHA384) */ #endif /* WOLFSSL_SHA512 */ +#ifdef __cplusplus + } /* extern "C" */ +#endif + #endif /* WOLF_CRYPT_HASH_H */