summaryrefslogtreecommitdiff
path: root/cbcmac.cpp
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2009-03-02 02:39:17 +0000
committerweidai <weidai11@users.noreply.github.com>2009-03-02 02:39:17 +0000
commitd8a644fc4ee2af9dc62f2a8c167b023d0c71d13b (patch)
tree0fecaa7a6728d07549a41864ea2cedfb245f0bd3 /cbcmac.cpp
parentfa25129ac981ceed9569496c02b83771b394fa40 (diff)
downloadcryptopp-git-d8a644fc4ee2af9dc62f2a8c167b023d0c71d13b.tar.gz
changes for 5.6:
- added AuthenticatedSymmetricCipher interface class and Filter wrappers - added CCM, GCM (with SSE2 assembly), CMAC, and SEED - improved AES speed on x86 and x64 - removed WORD64_AVAILABLE; compiler 64-bit int support is now required
Diffstat (limited to 'cbcmac.cpp')
-rw-r--r--cbcmac.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/cbcmac.cpp b/cbcmac.cpp
index dfac071b..6b0e8858 100644
--- a/cbcmac.cpp
+++ b/cbcmac.cpp
@@ -25,12 +25,11 @@ void CBC_MAC_Base::Update(const byte *input, size_t length)
length--;
}
- while (length >= blockSize)
+ if (length >= blockSize)
{
- xorbuf(m_reg, input, blockSize);
- ProcessBuf();
- input += blockSize;
- length -= blockSize;
+ size_t leftOver = AccessCipher().AdvancedProcessBlocks(m_reg, input, m_reg, length, BlockTransformation::BT_DontIncrementInOutPointers|BlockTransformation::BT_XorInput);
+ input += (length - leftOver);
+ length = leftOver;
}
while (length--)