diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-12-10 02:12:23 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-12-10 02:12:23 +0000 |
commit | c3bad1afc1564f3bfac8434d45d6694811139333 (patch) | |
tree | ebfbbcf4dffdf4914b9ce879d3d2c93d3615f7ab /camellia.cpp | |
parent | e553818e00684e8905ede16e53aa490c153b7e7a (diff) | |
download | cryptopp-c3bad1afc1564f3bfac8434d45d6694811139333.tar.gz |
port to GCC 4, reorganize implementations of SetKey
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@248 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'camellia.cpp')
-rw-r--r-- | camellia.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/camellia.cpp b/camellia.cpp index 4fff64c..05a1a27 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]); |