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 /serpent.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 'serpent.cpp')
-rw-r--r-- | serpent.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/serpent.cpp b/serpent.cpp index 80a59499..351186ce 100644 --- a/serpent.cpp +++ b/serpent.cpp @@ -20,9 +20,9 @@ void Serpent_KeySchedule(word32 *k, unsigned int rounds, const byte *userKey, si word32 t = k0[7];
unsigned int i;
for (i = 0; i < 8; ++i)
- k[i] = k0[i] = t = rotlFixed(k0[i] ^ k0[(i+3)%8] ^ k0[(i+5)%8] ^ t ^ 0x9e3779b9 ^ i, 11);
+ k[i] = k0[i] = t = rotlConstant<11>(k0[i] ^ k0[(i + 3) % 8] ^ k0[(i + 5) % 8] ^ t ^ 0x9e3779b9 ^ i);
for (i = 8; i < 4*(rounds+1); ++i)
- k[i] = t = rotlFixed(k[i-8] ^ k[i-5] ^ k[i-3] ^ t ^ 0x9e3779b9 ^ i, 11);
+ k[i] = t = rotlConstant<11>(k[i-8] ^ k[i-5] ^ k[i-3] ^ t ^ 0x9e3779b9 ^ i);
k -= 20;
word32 a,b,c,d,e;
|