summaryrefslogtreecommitdiff
path: root/chacha.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-11-25 02:52:19 -0500
committerJeffrey Walton <noloader@gmail.com>2017-11-25 02:52:19 -0500
commita074722bfa82d82c12879b8fdd9a62bac8bcaf89 (patch)
tree6321fd7bb3c9a3340ce8463242854a19bc0ef4e1 /chacha.cpp
parent2d4614084a4250ce4d60d535ccf506605477e4ed (diff)
downloadcryptopp-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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/chacha.cpp b/chacha.cpp
index 4aeed40b..a63998be 100644
--- a/chacha.cpp
+++ b/chacha.cpp
@@ -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()