Guard compile assert for Borland/Embarcadero (GH #512)

pull/484/merge
Jeffrey Walton 2017-09-21 02:01:04 -04:00
parent c6b096ddd4
commit dfeae9e983
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 2 additions and 0 deletions

2
sha3.h
View File

@ -67,8 +67,10 @@ public:
static std::string StaticAlgorithmName() { return "SHA3-" + IntToString(DIGESTSIZE * 8); } static std::string StaticAlgorithmName() { return "SHA3-" + IntToString(DIGESTSIZE * 8); }
unsigned int BlockSize() const { return BLOCKSIZE; } unsigned int BlockSize() const { return BLOCKSIZE; }
private: private:
#if !defined(__BORLANDC__)
CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE < 200); // ensure there was no underflow in the math CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE < 200); // ensure there was no underflow in the math
CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE > (int)T_DigestSize); // this is a general expectation by HMAC CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE > (int)T_DigestSize); // this is a general expectation by HMAC
#endif
}; };
//! \brief SHA3-224 message digest //! \brief SHA3-224 message digest