3 #ifndef CRYPTOPP_IMPORTS
7 NAMESPACE_BEGIN(CryptoPP)
11 AccessCipher().
SetKey(key, length, params);
12 m_reg.CleanNew(AccessCipher().
BlockSize());
18 unsigned int blockSize = AccessCipher().
BlockSize();
20 while (m_counter && length)
22 m_reg[m_counter++] ^= *input++;
23 if (m_counter == blockSize)
28 if (length >= blockSize)
30 size_t leftOver = AccessCipher().
AdvancedProcessBlocks(m_reg, input, m_reg, length, BlockTransformation::BT_DontIncrementInOutPointers|BlockTransformation::BT_XorInput);
31 input += (length - leftOver);
37 m_reg[m_counter++] ^= *input++;
38 if (m_counter == blockSize)
45 ThrowIfInvalidTruncatedSize(size);
50 memcpy(mac, m_reg, size);
51 memset(m_reg, 0, AccessCipher().
BlockSize());
54 void CBC_MAC_Base::ProcessBuf()