diff options
author | weidai <weidai11@users.noreply.github.com> | 2007-04-16 00:34:13 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2007-04-16 00:34:13 +0000 |
commit | c46c9fbc2be9ff8d0d97236bd78b2be4a74b754b (patch) | |
tree | 56bf19a09990ed7a57c8d48da5ceaf509e7a8fdc /modes.cpp | |
parent | de8b060ea1c0ec0d6ec396707972b07db9911198 (diff) | |
download | cryptopp-git-c46c9fbc2be9ff8d0d97236bd78b2be4a74b754b.tar.gz |
rename STRUCTURED_IV to UNIQUE_IV. assert correct cipher direction
Diffstat (limited to 'modes.cpp')
-rw-r--r-- | modes.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -61,6 +61,7 @@ inline void CTR_ModePolicy::ProcessMultipleBlocks(byte *output, const byte *inpu void CTR_ModePolicy::OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount) { + assert(m_cipher->IsForwardTransformation()); // CTR mode needs the "encrypt" direction of the underlying block cipher, even to decrypt unsigned int maxBlocks = m_cipher->OptimalNumberOfParallelBlocks(); if (maxBlocks == 1) { |