From c3bad1afc1564f3bfac8434d45d6694811139333 Mon Sep 17 00:00:00 2001 From: weidai Date: Sun, 10 Dec 2006 02:12:23 +0000 Subject: 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 --- camellia.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'camellia.cpp') 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]); -- cgit v1.2.1