summaryrefslogtreecommitdiff
path: root/sosemanuk.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 /sosemanuk.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 'sosemanuk.cpp')
-rw-r--r--sosemanuk.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sosemanuk.cpp b/sosemanuk.cpp
index 0ff37d0c..276ebb2d 100644
--- a/sosemanuk.cpp
+++ b/sosemanuk.cpp
@@ -85,7 +85,7 @@ void SosemanukPolicy::CipherResynchronize(byte *keystreamBuffer, const byte *iv,
#define XMUX(c, x, y) (x ^ (y & (0 - (c & 1))))
m_state[11] += XMUX(m_state[10], m_state[1], m_state[8]);
- m_state[10] = rotlFixed(m_state[10] * 0x54655307, 7);
+ m_state[10] = rotlConstant<7>(m_state[10] * 0x54655307);
}
extern "C" {
@@ -626,7 +626,7 @@ void SosemanukPolicy::OperateKeystream(KeystreamOperation operation, byte *outpu
#ifndef CRYPTOPP_GENERATE_X64_MASM
{
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) && !defined(CRYPTOPP_DISABLE_SOSEMANUK_ASM)
-#define MUL_A(x) (x = rotlFixed(x, 8), x ^ s_sosemanukMulTables[byte(x)])
+#define MUL_A(x) (x = (rotlConstant<7>(x)), x ^ s_sosemanukMulTables[byte(x)])
#else
#define MUL_A(x) (((x) << 8) ^ s_sosemanukMulTables[(x) >> 24])
#endif