diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-03-16 22:01:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-16 22:01:24 -0400 |
commit | ca123d14c1972fadc5865e114946414e75caac74 (patch) | |
tree | f525c2a1b62bdaf71b1979333b7b56b1936d57e7 /strciphr.h | |
parent | 4d15863b7195974e86427af4d4d4e3ce9d3e8ae7 (diff) | |
download | cryptopp-git-ca123d14c1972fadc5865e114946414e75caac74.tar.gz |
Avoid memcpy in AdditiveCipherTemplate<S>::ProcessData (GH #683, GH #1010, PR #1019)
We found we can avoid the memcpy in the previous workaround by using a volatile pointer. The pointer appears to tame the optimizer so the compiler does not short-circuit some calls when outString == inString.
Diffstat (limited to 'strciphr.h')
-rw-r--r-- | strciphr.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -702,13 +702,16 @@ public: NAMESPACE_END
+// Used by dll.cpp to ensure objects are in dll.o, and not strciphr.o.
#ifdef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
-#include "strciphr.cpp"
+# include "strciphr.cpp"
#endif
NAMESPACE_BEGIN(CryptoPP)
+
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractPolicyHolder<AdditiveCipherAbstractPolicy, SymmetricCipher>;
CRYPTOPP_DLL_TEMPLATE_CLASS AdditiveCipherTemplate<AbstractPolicyHolder<AdditiveCipherAbstractPolicy, SymmetricCipher> >;
+
CRYPTOPP_DLL_TEMPLATE_CLASS CFB_CipherTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, SymmetricCipher> >;
CRYPTOPP_DLL_TEMPLATE_CLASS CFB_EncryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, SymmetricCipher> >;
CRYPTOPP_DLL_TEMPLATE_CLASS CFB_DecryptionTemplate<AbstractPolicyHolder<CFB_CipherAbstractPolicy, SymmetricCipher> >;
|