summaryrefslogtreecommitdiff
path: root/modes.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-12-10 02:12:23 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-12-10 02:12:23 +0000
commitc3bad1afc1564f3bfac8434d45d6694811139333 (patch)
treeebfbbcf4dffdf4914b9ce879d3d2c93d3615f7ab /modes.h
parente553818e00684e8905ede16e53aa490c153b7e7a (diff)
downloadcryptopp-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 'modes.h')
-rw-r--r--modes.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/modes.h b/modes.h
index c4e875e..04e5016 100644
--- a/modes.h
+++ b/modes.h
@@ -37,8 +37,6 @@ public:
size_t GetValidKeyLength(size_t n) const {return m_cipher->GetValidKeyLength(n);}
bool IsValidKeyLength(size_t n) const {return m_cipher->IsValidKeyLength(n);}
- void SetKey(const byte *key, size_t length, const NameValuePairs &params = g_nullNameValuePairs);
-
unsigned int OptimalDataAlignment() const {return BlockSize();}
unsigned int IVSize() const {return BlockSize();}
@@ -56,7 +54,6 @@ protected:
{
m_register.New(m_cipher->BlockSize());
}
- virtual void UncheckedSetKey(const NameValuePairs &params, const byte *key, unsigned int length, const byte *iv) =0;
BlockCipher *m_cipher;
SecByteBlock m_register;
@@ -171,7 +168,7 @@ private:
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE BlockOrientedCipherModeBase : public CipherModeBase
{
public:
- void UncheckedSetKey(const NameValuePairs &params, const byte *key, unsigned int length, const byte *iv);
+ void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
unsigned int MandatoryBlockSize() const {return BlockSize();}
bool IsRandomAccess() const {return false;}
bool IsSelfInverting() const {return false;}
@@ -225,9 +222,9 @@ public:
static const char * CRYPTOPP_API StaticAlgorithmName() {return "CBC/CTS";}
protected:
- void UncheckedSetKey(const NameValuePairs &params, const byte *key, unsigned int length, const byte *iv)
+ void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)
{
- CBC_Encryption::UncheckedSetKey(params, key, length, iv);
+ CBC_Encryption::UncheckedSetKey(key, length, params);
m_stolenIV = params.GetValueWithDefault(Name::StolenIV(), (byte *)NULL);
}