Cleanup defines in sha.cpp

There's no need for extra guards with CRYPTOPP_DISABLE_SHA_ASM because relevant macros are undefined
pull/668/merge
Jeffrey Walton 2018-07-15 12:47:34 -04:00
parent 7e7d86f6fd
commit f143534d99
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 4 additions and 4 deletions

View File

@ -164,7 +164,7 @@ std::string SHA1::AlgorithmProvider() const
if (HasSHA()) if (HasSHA())
return "SHANI"; return "SHANI";
#endif #endif
#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SHA_ASM) #if CRYPTOPP_SSE2_ASM_AVAILABLE
if (HasSSE2()) if (HasSSE2())
return "SSE2"; return "SSE2";
#endif #endif
@ -350,7 +350,7 @@ std::string SHA256_AlgorithmProvider()
if (HasSHA()) if (HasSHA())
return "SHANI"; return "SHANI";
#endif #endif
#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SHA_ASM) #if CRYPTOPP_SSE2_ASM_AVAILABLE
if (HasSSE2()) if (HasSSE2())
return "SSE2"; return "SSE2";
#endif #endif
@ -819,7 +819,7 @@ size_t SHA224::HashMultipleBlocks(const word32 *input, size_t length)
return length & (SHA256::BLOCKSIZE - 1); return length & (SHA256::BLOCKSIZE - 1);
} }
#endif #endif
#if CRYPTOPP_SSE2_ASM_AVAILABLE #if CRYPTOPP_SSE2_ASM_AVAILABLE || CRYPTOPP_X64_MASM_AVAILABLE
if (HasSSE2()) if (HasSSE2())
{ {
const size_t res = length & (SHA256::BLOCKSIZE - 1); const size_t res = length & (SHA256::BLOCKSIZE - 1);
@ -867,7 +867,7 @@ size_t SHA224::HashMultipleBlocks(const word32 *input, size_t length)
std::string SHA512_AlgorithmProvider() std::string SHA512_AlgorithmProvider()
{ {
#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SHA_ASM) #if CRYPTOPP_SSE2_ASM_AVAILABLE
if (HasSSE2()) if (HasSSE2())
return "SSE2"; return "SSE2";
#endif #endif