diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-08-17 07:49:35 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-08-17 07:49:35 -0400 |
commit | b2c5616ede18ac075d0d602dd0bc1f5955fd832e (patch) | |
tree | 2012d0918fe5f9ca56126dacf5864fef7e4168db /simon.cpp | |
parent | e2be0cdecce71940682219c067d871c5477a6418 (diff) | |
download | cryptopp-git-b2c5616ede18ac075d0d602dd0bc1f5955fd832e.tar.gz |
Fix AlgorithmProvider for SIMON and SPECK on Solaris
Diffstat (limited to 'simon.cpp')
-rw-r--r-- | simon.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -243,17 +243,19 @@ extern size_t SIMON128_Dec_AdvancedProcessBlocks_POWER8(const word64* subKeys, s std::string SIMON64::Base::AlgorithmProvider() const
{
-#if defined(CRYPTOPP_SSE41_AVAILABLE)
+#if (CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS)
+# if (CRYPTOPP_SSE41_AVAILABLE)
if (HasSSE41())
return "SSE4.1";
-#endif
-#if (CRYPTOPP_ARM_NEON_AVAILABLE)
+# endif
+# if (CRYPTOPP_ARM_NEON_AVAILABLE)
if (HasNEON())
return "NEON";
-#endif
-#if (CRYPTOPP_POWER7_AVAILABLE)
+# endif
+# if (CRYPTOPP_POWER7_AVAILABLE)
if (HasPower7())
return "Power7";
+# endif
#endif
return "C++";
}
@@ -339,17 +341,19 @@ void SIMON64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, std::string SIMON128::Base::AlgorithmProvider() const
{
-#if defined(CRYPTOPP_SSSE3_AVAILABLE)
+#if (CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS)
+# if (CRYPTOPP_SSSE3_AVAILABLE)
if (HasSSSE3())
return "SSSE3";
-#endif
-#if (CRYPTOPP_ARM_NEON_AVAILABLE)
+# endif
+# if (CRYPTOPP_ARM_NEON_AVAILABLE)
if (HasNEON())
return "NEON";
-#endif
-#if (CRYPTOPP_POWER8_AVAILABLE)
+# endif
+# if (CRYPTOPP_POWER8_AVAILABLE)
if (HasPower8())
return "Power8";
+# endif
#endif
return "C++";
}
|