Updated documentation
parent
29dae707fd
commit
efd4bc6b08
18
dmac.h
18
dmac.h
|
|
@ -11,7 +11,9 @@
|
|||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
//! _
|
||||
//! \class DMAC_Base
|
||||
//! \brief DMAC message authentication code base class
|
||||
//! \tparam T class derived from BlockCipherDocumentation
|
||||
template <class T>
|
||||
class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
|
||||
{
|
||||
|
|
@ -37,15 +39,21 @@ private:
|
|||
unsigned int m_counter;
|
||||
};
|
||||
|
||||
//! DMAC
|
||||
/*! Based on "CBC MAC for Real-Time Data Sources" by Erez Petrank
|
||||
and Charles Rackoff. T should be a class derived from BlockCipherDocumentation.
|
||||
*/
|
||||
//! \class DMAC
|
||||
//! \brief DMAC message authentication code
|
||||
//! \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>
|
||||
class DMAC : public MessageAuthenticationCodeFinal<DMAC_Base<T> >
|
||||
{
|
||||
public:
|
||||
//! \brief Construct a 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)
|
||||
{this->SetKey(key, length);}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue