summaryrefslogtreecommitdiff
path: root/square.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 /square.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 'square.cpp')
-rw-r--r--square.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/square.cpp b/square.cpp
index 0b960323..4065a7f3 100644
--- a/square.cpp
+++ b/square.cpp
@@ -58,7 +58,7 @@ void Square::Base::UncheckedSetKey(const byte *userKey, unsigned int length, con
/* apply the key evolution function */
for (int i = 1; i < ROUNDS+1; i++)
{
- roundkeys(i, 0) = roundkeys(i-1, 0) ^ rotlFixed(roundkeys(i-1, 3), 8U) ^ offset[i-1];
+ roundkeys(i, 0) = roundkeys(i-1, 0) ^ rotlConstant<8>(roundkeys(i-1, 3)) ^ offset[i-1];
roundkeys(i, 1) = roundkeys(i-1, 1) ^ roundkeys(i, 0);
roundkeys(i, 2) = roundkeys(i-1, 2) ^ roundkeys(i, 1);
roundkeys(i, 3) = roundkeys(i-1, 3) ^ roundkeys(i, 2);