diff options
author | weidai <weidai11@users.noreply.github.com> | 2006-12-10 02:12:23 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2006-12-10 02:12:23 +0000 |
commit | f05ea58bb369988a61438411539ea955e0adf8c2 (patch) | |
tree | ebfbbcf4dffdf4914b9ce879d3d2c93d3615f7ab /modes.cpp | |
parent | 28c392e08234698cbe0e5fc3ffb3cfa5af1bc461 (diff) | |
download | cryptopp-git-f05ea58bb369988a61438411539ea955e0adf8c2.tar.gz |
port to GCC 4, reorganize implementations of SetKey
Diffstat (limited to 'modes.cpp')
-rw-r--r-- | modes.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -24,11 +24,6 @@ void Modes_TestInstantiations() } #endif -void CipherModeBase::SetKey(const byte *key, size_t length, const NameValuePairs ¶ms) -{ - 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 ¶ms, const byte *key, unsigned int length, const byte *iv) +void BlockOrientedCipherModeBase::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms) { 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) |