From f05ea58bb369988a61438411539ea955e0adf8c2 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 --- blowfish.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'blowfish.cpp') diff --git a/blowfish.cpp b/blowfish.cpp index fa6c7238..aaa637cc 100644 --- a/blowfish.cpp +++ b/blowfish.cpp @@ -6,7 +6,7 @@ NAMESPACE_BEGIN(CryptoPP) -void Blowfish::Base::UncheckedSetKey(CipherDir dir, const byte *key_string, unsigned int keylength) +void Blowfish::Base::UncheckedSetKey(const byte *key_string, unsigned int keylength, const NameValuePairs &) { AssertValidKeyLength(keylength); @@ -35,7 +35,7 @@ void Blowfish::Base::UncheckedSetKey(CipherDir dir, const byte *key_string, unsi for (i=0; i<4*256-2; i+=2) crypt_block(sbox+i, sbox+i+2); - if (dir==DECRYPTION) + if (!IsForwardTransformation()) for (i=0; i<(ROUNDS+2)/2; i++) std::swap(pbox[i], pbox[ROUNDS+1-i]); } -- cgit v1.2.1