summaryrefslogtreecommitdiff
path: root/modes.cpp
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.cpp
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.cpp')
-rw-r--r--modes.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/modes.cpp b/modes.cpp
index 941a0dc..cdd4c26 100644
--- a/modes.cpp
+++ b/modes.cpp
@@ -24,11 +24,6 @@ void Modes_TestInstantiations()
}
#endif
-void CipherModeBase::SetKey(const byte *key, size_t length, const NameValuePairs &params)
-{
- UncheckedSetKey(params, key, (unsigned int)length, GetIVAndThrowIfInvalid(params)); // the underlying cipher will check the key length
-}
-
void CipherModeBase::GetNextIV(byte *IV)
{
if (!IsForwardTransformation())
@@ -102,12 +97,12 @@ void CTR_ModePolicy::CipherResynchronize(byte *keystreamBuffer, const byte *iv)
CopyOrZero(m_counterArray, iv, s);
}
-void BlockOrientedCipherModeBase::UncheckedSetKey(const NameValuePairs &params, const byte *key, unsigned int length, const byte *iv)
+void BlockOrientedCipherModeBase::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)
{
m_cipher->SetKey(key, length, params);
ResizeBuffers();
if (IsResynchronizable())
- Resynchronize(iv);
+ Resynchronize(GetIVAndThrowIfInvalid(params));
}
void BlockOrientedCipherModeBase::ProcessData(byte *outString, const byte *inString, size_t length)