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 */