summaryrefslogtreecommitdiff
path: root/cryptopp/crypto/cbcmac.h
diff options
context:
space:
mode:
authorwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-26 14:19:43 +0000
committerwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-26 14:19:43 +0000
commit7aff1e4cb053394db57c2814d5fe1e6493e0cc75 (patch)
treec8585e44049b37e4da152495c954242204c2c38d /cryptopp/crypto/cbcmac.h
parent6f3d69266933ef120d229e0daf2da164b77214d0 (diff)
Project folders rename part 2
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@214 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'cryptopp/crypto/cbcmac.h')
-rw-r--r--cryptopp/crypto/cbcmac.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/cryptopp/crypto/cbcmac.h b/cryptopp/crypto/cbcmac.h
deleted file mode 100644
index 9e944c6..0000000
--- a/cryptopp/crypto/cbcmac.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef CRYPTOPP_CBCMAC_H
-#define CRYPTOPP_CBCMAC_H
-
-#include "seckey.h"
-#include "secblock.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-//! _
-class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_MAC_Base : public MessageAuthenticationCode
-{
-public:
- CBC_MAC_Base() {}
-
- void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params);
- void Update(const byte *input, size_t length);
- void TruncatedFinal(byte *mac, size_t size);
- unsigned int DigestSize() const {return const_cast<CBC_MAC_Base*>(this)->AccessCipher().BlockSize();}
-
-protected:
- virtual BlockCipher & AccessCipher() =0;
-
-private:
- void ProcessBuf();
- SecByteBlock m_reg;
- unsigned int m_counter;
-};
-
-//! <a href="http://www.weidai.com/scan-mirror/mac.html#CBC-MAC">CBC-MAC</a>
-/*! Compatible with FIPS 113. T should be a class derived from BlockCipherDocumentation.
- Secure only for fixed length messages. For variable length
- messages use DMAC.
-*/
-template <class T>
-class CBC_MAC : public MessageAuthenticationCodeImpl<CBC_MAC_Base, CBC_MAC<T> >, public SameKeyLengthAs<T>
-{
-public:
- CBC_MAC() {}
- CBC_MAC(const byte *key, size_t length=SameKeyLengthAs<T>::DEFAULT_KEYLENGTH)
- {this->SetKey(key, length);}
-
- static std::string StaticAlgorithmName() {return std::string("CBC-MAC(") + T::StaticAlgorithmName() + ")";}
-
-private:
- BlockCipher & AccessCipher() {return m_cipher;}
- typename T::Encryption m_cipher;
-};
-
-NAMESPACE_END
-
-#endif