Updated documentation

pull/339/head
Jeffrey Walton 2016-10-25 23:43:40 -04:00
parent 29dae707fd
commit efd4bc6b08
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 13 additions and 5 deletions

18
dmac.h
View File

@ -11,7 +11,9 @@
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)
//! _ //! \class DMAC_Base
//! \brief DMAC message authentication code base class
//! \tparam T class derived from BlockCipherDocumentation
template <class T> template <class T>
class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
{ {
@ -37,15 +39,21 @@ private:
unsigned int m_counter; unsigned int m_counter;
}; };
//! DMAC //! \class DMAC
/*! Based on "CBC MAC for Real-Time Data Sources" by Erez Petrank //! \brief DMAC message authentication code
and Charles Rackoff. T should be a class derived from BlockCipherDocumentation. //! \tparam T class derived from BlockCipherDocumentation
*/ //! \sa <A HREF="https://eprint.iacr.org/1997/010">CBC MAC for Real-Time Data Sources (08.15.1997)</A>
//! by Erez Petrank and Charles Rackoff
template <class T> template <class T>
class DMAC : public MessageAuthenticationCodeFinal<DMAC_Base<T> > class DMAC : public MessageAuthenticationCodeFinal<DMAC_Base<T> >
{ {
public: public:
//! \brief Construct a DMAC
DMAC() {} DMAC() {}
//! \brief Construct a DMAC
//! \param key a byte array used to key the cipher
//! \param length the size of the byte array, in bytes
DMAC(const byte *key, size_t length=DMAC_Base<T>::DEFAULT_KEYLENGTH) DMAC(const byte *key, size_t length=DMAC_Base<T>::DEFAULT_KEYLENGTH)
{this->SetKey(key, length);} {this->SetKey(key, length);}
}; };