summaryrefslogtreecommitdiff
path: root/modes.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-10-01 09:32:07 -0400
committerJeffrey Walton <noloader@gmail.com>2017-10-01 09:32:07 -0400
commit3cfbe66c829b68de01ff40536664bdffe2cb2a7f (patch)
tree28475ca098f8687234febedcd7865345a55ab8cd /modes.cpp
parentbbc6ea53558c12ed7ea8880b8515432f6c7414d2 (diff)
downloadcryptopp-git-3cfbe66c829b68de01ff40536664bdffe2cb2a7f.tar.gz
Update documentation
Diffstat (limited to 'modes.cpp')
-rw-r--r--modes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modes.cpp b/modes.cpp
index 5738b403..1dbc8fc3 100644
--- a/modes.cpp
+++ b/modes.cpp
@@ -177,7 +177,7 @@ void CBC_Encryption::ProcessData(byte *outString, const byte *inString, size_t l
if (!length) return;
CRYPTOPP_ASSERT(length%BlockSize()==0);
- unsigned int blockSize = BlockSize();
+ const unsigned int blockSize = BlockSize();
m_cipher->AdvancedProcessBlocks(inString, m_register, outString, blockSize, BlockTransformation::BT_XorInput);
if (length > blockSize)
m_cipher->AdvancedProcessBlocks(inString+blockSize, outString, outString+blockSize, length-blockSize, BlockTransformation::BT_XorInput);
@@ -227,7 +227,7 @@ void CBC_Decryption::ProcessData(byte *outString, const byte *inString, size_t l
return;
CRYPTOPP_ASSERT(length%BlockSize()==0);
- unsigned int blockSize = BlockSize();
+ const unsigned int blockSize = BlockSize();
memcpy(m_temp, inString+length-blockSize, blockSize); // save copy now in case of in-place decryption
if (length > blockSize)
m_cipher->AdvancedProcessBlocks(inString+blockSize, inString, outString+blockSize, length-blockSize, BlockTransformation::BT_ReverseDirection|BlockTransformation::BT_AllowParallel);