diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-11-25 02:52:19 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-11-25 02:52:19 -0500 |
commit | a074722bfa82d82c12879b8fdd9a62bac8bcaf89 (patch) | |
tree | 6321fd7bb3c9a3340ce8463242854a19bc0ef4e1 /chacha.cpp | |
parent | 2d4614084a4250ce4d60d535ccf506605477e4ed (diff) | |
download | cryptopp-git-a074722bfa82d82c12879b8fdd9a62bac8bcaf89.tar.gz |
Switch to rotlConstant and rotrConstant
This will help Clang and its need for a constexpr
Diffstat (limited to 'chacha.cpp')
-rw-r--r-- | chacha.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -12,10 +12,10 @@ NAMESPACE_BEGIN(CryptoPP)
#define CHACHA_QUARTER_ROUND(a,b,c,d) \
- a += b; d ^= a; d = rotlFixed<word32>(d,16); \
- c += d; b ^= c; b = rotlFixed<word32>(b,12); \
- a += b; d ^= a; d = rotlFixed<word32>(d, 8); \
- c += d; b ^= c; b = rotlFixed<word32>(b, 7);
+ a += b; d ^= a; d = rotlConstant<16,word32>(d); \
+ c += d; b ^= c; b = rotlConstant<12,word32>(b); \
+ a += b; d ^= a; d = rotlConstant<8,word32>(d); \
+ c += d; b ^= c; b = rotlConstant<7,word32>(b);
#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ChaCha_TestInstantiations()
|