Botan
2.1.0
Crypto and TLS for C++11
Main Page
Namespaces
Classes
Files
File List
File Members
src
lib
mac
x919_mac
x919_mac.h
Go to the documentation of this file.
1
/*
2
* ANSI X9.19 MAC
3
* (C) 1999-2007 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
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
14
namespace
Botan
{
15
16
/**
17
* DES/3DES-based MAC from ANSI X9.19
18
*/
19
class
BOTAN_DLL
ANSI_X919_MAC
final :
public
MessageAuthenticationCode
20
{
21
public
:
22
void
clear()
override
;
23
std::string name()
const override
;
24
size_t
output_length
()
const override
{
return
8; }
25
26
MessageAuthenticationCode
* clone()
const override
;
27
28
Key_Length_Specification
key_spec
()
const override
29
{
30
return
Key_Length_Specification
(8, 16, 8);
31
}
32
33
ANSI_X919_MAC
();
34
35
ANSI_X919_MAC
(
const
ANSI_X919_MAC
&) =
delete
;
36
ANSI_X919_MAC
& operator=(
const
ANSI_X919_MAC
&) =
delete
;
37
private
:
38
void
add_data(
const
uint8_t[],
size_t
)
override
;
39
void
final_result(uint8_t[])
override
;
40
void
key_schedule(
const
uint8_t[],
size_t
)
override
;
41
42
std::unique_ptr<BlockCipher> m_des1, m_des2;
43
secure_vector<uint8_t>
m_state;
44
size_t
m_position;
45
};
46
47
}
48
49
#endif
Botan::Key_Length_Specification
Definition:
key_spec.h:18
Botan::MessageAuthenticationCode
Definition:
mac.h:20
Botan::secure_vector
std::vector< T, secure_allocator< T >> secure_vector
Definition:
secmem.h:121
Botan::ANSI_X919_MAC
Definition:
x919_mac.h:19
Botan::ANSI_X919_MAC::output_length
size_t output_length() const override
Definition:
x919_mac.h:24
Botan
Definition:
alg_id.cpp:13
Botan::ANSI_X919_MAC::key_spec
Key_Length_Specification key_spec() const override
Definition:
x919_mac.h:28
Generated on Fri Aug 4 2017 19:29:38 for Botan by
1.8.9.1