summaryrefslogtreecommitdiff
path: root/sha.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-07-15 12:47:34 -0400
committerJeffrey Walton <noloader@gmail.com>2018-07-15 12:47:34 -0400
commitf143534d99150a8cd9b2974ab3ee9caaea4eb152 (patch)
treea9387c07ac4b52593fa1c782032115ab35cf8ead /sha.cpp
parent7e7d86f6fd84ee80f75773859eb6b6c7fdcfc9ea (diff)
downloadcryptopp-git-f143534d99150a8cd9b2974ab3ee9caaea4eb152.tar.gz
Cleanup defines in sha.cpp
There's no need for extra guards with CRYPTOPP_DISABLE_SHA_ASM because relevant macros are undefined
Diffstat (limited to 'sha.cpp')
-rw-r--r--sha.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sha.cpp b/sha.cpp
index f5bd8e02..ea0b02d3 100644
--- a/sha.cpp
+++ b/sha.cpp
@@ -164,7 +164,7 @@ std::string SHA1::AlgorithmProvider() const
if (HasSHA())
return "SHANI";
#endif
-#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SHA_ASM)
+#if CRYPTOPP_SSE2_ASM_AVAILABLE
if (HasSSE2())
return "SSE2";
#endif
@@ -350,7 +350,7 @@ std::string SHA256_AlgorithmProvider()
if (HasSHA())
return "SHANI";
#endif
-#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SHA_ASM)
+#if CRYPTOPP_SSE2_ASM_AVAILABLE
if (HasSSE2())
return "SSE2";
#endif
@@ -819,7 +819,7 @@ size_t SHA224::HashMultipleBlocks(const word32 *input, size_t length)
return length & (SHA256::BLOCKSIZE - 1);
}
#endif
-#if CRYPTOPP_SSE2_ASM_AVAILABLE
+#if CRYPTOPP_SSE2_ASM_AVAILABLE || CRYPTOPP_X64_MASM_AVAILABLE
if (HasSSE2())
{
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()
{
-#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SHA_ASM)
+#if CRYPTOPP_SSE2_ASM_AVAILABLE
if (HasSSE2())
return "SSE2";
#endif