diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2007-04-16 00:34:13 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2007-04-16 00:34:13 +0000 |
commit | 866f75e49a3f1a83ad937acb6dd66f84fe422d8e (patch) | |
tree | 56bf19a09990ed7a57c8d48da5ceaf509e7a8fdc /modes.cpp | |
parent | 6320616a7ffda3e44bc6a82a60abc8e9929ea5bd (diff) | |
download | cryptopp-866f75e49a3f1a83ad937acb6dd66f84fe422d8e.tar.gz |
rename STRUCTURED_IV to UNIQUE_IV. assert correct cipher direction
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@311 57ff6487-cd31-0410-9ec3-f628ee90f5f0
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) { |