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 /modes.h | |
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 'modes.h')
-rw-r--r-- | modes.h | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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 ¶ms = 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 ¶ms, 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 ¶ms, const byte *key, unsigned int length, const byte *iv); + void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms); 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 ¶ms, const byte *key, unsigned int length, const byte *iv) + void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms) { - CBC_Encryption::UncheckedSetKey(params, key, length, iv); + CBC_Encryption::UncheckedSetKey(key, length, params); m_stolenIV = params.GetValueWithDefault(Name::StolenIV(), (byte *)NULL); } |