~ubuntu-branches/ubuntu/intrepid/libcrypto++/intrepid

« back to all changes in this revision

Viewing changes to dmac.h

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Machard
  • Date: 2004-08-27 12:35:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040827123505-7evgxiu7k8memiyk
Tags: 5.2.1a-1
* Urgency set to high because lastest upload was unclean
* Rename libcrypto++-5.2.1.orig.tar.gz in  libcrypto++-5.2.1a.orig.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
NAMESPACE_BEGIN(CryptoPP)
7
7
 
 
8
//! _
8
9
template <class T>
9
 
class DMAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
 
10
class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
10
11
{
11
12
public:
12
13
        static std::string StaticAlgorithmName() {return std::string("DMAC(") + T::StaticAlgorithmName() + ")";}
32
33
 
33
34
//! DMAC
34
35
/*! Based on "CBC MAC for Real-Time Data Sources" by Erez Petrank
35
 
        and Charles Rackoff. T should be BlockTransformation class.
 
36
        and Charles Rackoff. T should be a class derived from BlockCipherDocumentation.
36
37
*/
37
38
template <class T>
38
 
class DMAC : public MessageAuthenticationCodeTemplate<DMAC_Base<T> >
 
39
class DMAC : public MessageAuthenticationCodeFinal<DMAC_Base<T> >
39
40
{
40
41
public:
41
42
        DMAC() {}
42
43
        DMAC(const byte *key, unsigned int length=DMAC_Base<T>::DEFAULT_KEYLENGTH)
43
 
                {SetKey(key, length);}
 
44
                {this->SetKey(key, length);}
44
45
};
45
46
 
46
47
template <class T>