summaryrefslogtreecommitdiff
path: root/camellia.cpp
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2006-12-10 02:12:23 +0000
committerweidai <weidai11@users.noreply.github.com>2006-12-10 02:12:23 +0000
commitf05ea58bb369988a61438411539ea955e0adf8c2 (patch)
treeebfbbcf4dffdf4914b9ce879d3d2c93d3615f7ab /camellia.cpp
parent28c392e08234698cbe0e5fc3ffb3cfa5af1bc461 (diff)
downloadcryptopp-git-f05ea58bb369988a61438411539ea955e0adf8c2.tar.gz
port to GCC 4, reorganize implementations of SetKey
Diffstat (limited to 'camellia.cpp')
-rw-r--r--camellia.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/camellia.cpp b/camellia.cpp
index 4fff64c9..05a1a272 100644
--- a/camellia.cpp
+++ b/camellia.cpp
@@ -56,7 +56,7 @@ inline void rotl128(word64 *x, unsigned int bits)
x[1] = (x[1] << bits) | temp;
}
-void Camellia::Base::UncheckedSetKey(CipherDir dir, const byte *key, unsigned int keylen)
+void Camellia::Base::UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs &)
{
AssertValidKeyLength(keylen);
@@ -171,7 +171,7 @@ void Camellia::Base::UncheckedSetKey(CipherDir dir, const byte *key, unsigned in
ks[32] = KB[0]; ks[33] = KB[1];
}
- if (dir == DECRYPTION) // reverse key schedule order
+ if (!IsForwardTransformation()) // reverse key schedule order
{
std::swap(ks[0], ks[kslen-2]);
std::swap(ks[1], ks[kslen-1]);