Botan 1.10.17
x919_mac.h
Go to the documentation of this file.
1/*
2* ANSI X9.19 MAC
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_ANSI_X919_MAC_H__
9#define BOTAN_ANSI_X919_MAC_H__
10
11#include <botan/mac.h>
12#include <botan/block_cipher.h>
13
14namespace Botan {
15
16/**
17* DES/3DES-based MAC from ANSI X9.19
18*/
20 {
21 public:
22 void clear();
23 std::string name() const;
24 size_t output_length() const { return e->block_size(); }
25 MessageAuthenticationCode* clone() const;
26
28 {
29 return Key_Length_Specification(8, 16, 8);
30 }
31
32 /**
33 * @param cipher the underlying block cipher to use
34 */
37 private:
38 void add_data(const byte[], size_t);
39 void final_result(byte[]);
40 void key_schedule(const byte[], size_t);
41
42 BlockCipher* e;
43 BlockCipher* d;
45 size_t position;
46 };
47
48}
49
50#endif
size_t output_length() const
Definition x919_mac.h:24
std::string name() const
Definition x919_mac.cpp:74
ANSI_X919_MAC(BlockCipher *cipher)
Definition x919_mac.cpp:87
Key_Length_Specification key_spec() const
Definition x919_mac.h:27