From 45ffb7e82794a3a023ccbd653f657b5c220135c7 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 20 Jul 2018 13:15:29 -0400 Subject: [PATCH] Fix crash in SHA-512 when using different compile options (GH #661) This also helps clear a crash on Sparc due to unaligned access to an uint64_t (GH #689) --- sha.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sha.h b/sha.h index 23c9f6c1..f2c3196e 100644 --- a/sha.h +++ b/sha.h @@ -11,12 +11,6 @@ #include "config.h" #include "iterhash.h" -#if (CRYPTOPP_BOOL_X86) -# define SHA_X86_ALIGN16 true -#else -# define SHA_X86_ALIGN16 false -#endif - NAMESPACE_BEGIN(CryptoPP) /// \brief SHA-1 message digest @@ -138,7 +132,7 @@ protected: /// \brief SHA-512 message digest /// \sa SHA-512 /// \since SHA2 since Crypto++ 4.0, Power8 SHA since Crypto++ 6.1 -class CRYPTOPP_DLL SHA512 : public IteratedHashWithStaticTransform +class CRYPTOPP_DLL SHA512 : public IteratedHashWithStaticTransform { public: /// \brief Initialize state array @@ -173,7 +167,7 @@ public: /// \brief SHA-384 message digest /// \sa SHA-384 /// \since SHA2 since Crypto++ 4.0, Power8 SHA since Crypto++ 6.1 -class CRYPTOPP_DLL SHA384 : public IteratedHashWithStaticTransform +class CRYPTOPP_DLL SHA384 : public IteratedHashWithStaticTransform { public: /// \brief Initialize state array