diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-12-26 00:46:50 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-12-26 00:46:50 -0500 |
commit | b7133e7b3b25ad15810ec90911b0bd01a2ff5ad6 (patch) | |
tree | 00fcaa836260218bdf9c09d3da1614af5b5e203e /emsa2.cpp | |
parent | c0a8dab984d1214a76b6116a02baf1021bf7dc73 (diff) | |
download | cryptopp-git-b7133e7b3b25ad15810ec90911b0bd01a2ff5ad6.tar.gz |
Fix Clang specialization and definition warnings (GH #300, GH #533)
Clang 3.8 and above generates lots of "'PKCS_DigestDecoration<SHA1>::decoration' required here, but no definition is available" warnings
Diffstat (limited to 'emsa2.cpp')
-rw-r--r-- | emsa2.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -7,6 +7,15 @@ NAMESPACE_BEGIN(CryptoPP)
+// Inclusion based on DLL due to Clang, http://github.com/weidai11/cryptopp/issues/300
+#ifndef CRYPTOPP_IS_DLL
+template<> const byte EMSA2HashId<SHA1>::id = 0x33;
+template<> const byte EMSA2HashId<SHA224>::id = 0x38;
+template<> const byte EMSA2HashId<SHA256>::id = 0x34;
+template<> const byte EMSA2HashId<SHA384>::id = 0x36;
+template<> const byte EMSA2HashId<SHA512>::id = 0x35;
+#endif
+
void EMSA2Pad::ComputeMessageRepresentative(RandomNumberGenerator& /*rng*/,
const byte* recoverableMessage, size_t recoverableMessageLength,
HashTransformation &hash, HashIdentifier hashIdentifier, bool messageEmpty,
|