diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-07-20 16:21:49 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-07-20 16:21:49 +0000 |
commit | f424a18112032cf61d2871a6b91a5af607c171ae (patch) | |
tree | 88fedc4e28941ceecda7026f0b06eba6271f91d5 /plugins/CryptoPP/crypto/cbcmac.cpp | |
parent | bfe1bd0fc087be44c70904aee0fe4276643d206d (diff) |
CryptoPP:
changed folder structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@1083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/crypto/cbcmac.cpp')
-rw-r--r-- | plugins/CryptoPP/crypto/cbcmac.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/plugins/CryptoPP/crypto/cbcmac.cpp b/plugins/CryptoPP/crypto/cbcmac.cpp deleted file mode 100644 index 322a4c3845..0000000000 --- a/plugins/CryptoPP/crypto/cbcmac.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include "pch.h"
-
-#ifndef CRYPTOPP_IMPORTS
-
-#include "cbcmac.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-void CBC_MAC_Base::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms)
-{
- AccessCipher().SetKey(key, length, params);
- m_reg.CleanNew(AccessCipher().BlockSize());
- m_counter = 0;
-}
-
-void CBC_MAC_Base::Update(const byte *input, size_t length)
-{
- unsigned int blockSize = AccessCipher().BlockSize();
-
- while (m_counter && length)
- {
- m_reg[m_counter++] ^= *input++;
- if (m_counter == blockSize)
- ProcessBuf();
- length--;
- }
-
- while (length >= blockSize)
- {
- xorbuf(m_reg, input, blockSize);
- ProcessBuf();
- input += blockSize;
- length -= blockSize;
- }
-
- while (length--)
- {
- m_reg[m_counter++] ^= *input++;
- if (m_counter == blockSize)
- ProcessBuf();
- }
-}
-
-void CBC_MAC_Base::TruncatedFinal(byte *mac, size_t size)
-{
- ThrowIfInvalidTruncatedSize(size);
-
- if (m_counter)
- ProcessBuf();
-
- memcpy(mac, m_reg, size);
- memset(m_reg, 0, AccessCipher().BlockSize());
-}
-
-void CBC_MAC_Base::ProcessBuf()
-{
- AccessCipher().ProcessBlock(m_reg);
- m_counter = 0;
-}
-
-NAMESPACE_END
-
-#endif
|