Botan 2.19.3
Crypto and TLS for C&
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
15
16namespace Botan {
17
18/**
19* DES/3DES-based MAC from ANSI X9.19
20*/
22 {
23 public:
24 void clear() override;
25 std::string name() const override;
26 size_t output_length() const override { return 8; }
27
28 MessageAuthenticationCode* clone() const override;
29
31 {
32 return Key_Length_Specification(8, 16, 8);
33 }
34
36
37 ANSI_X919_MAC(const ANSI_X919_MAC&) = delete;
39 private:
40 void add_data(const uint8_t[], size_t) override;
41 void final_result(uint8_t[]) override;
42 void key_schedule(const uint8_t[], size_t) override;
43
44 std::unique_ptr<BlockCipher> m_des1, m_des2;
46 size_t m_position;
47 };
48
49}
50
51#endif
size_t output_length() const override
Definition x919_mac.h:26
Key_Length_Specification key_spec() const override
Definition x919_mac.h:30
ANSI_X919_MAC & operator=(const ANSI_X919_MAC &)=delete
ANSI_X919_MAC(const ANSI_X919_MAC &)=delete
virtual MessageAuthenticationCode * clone() const =0
virtual std::string name() const =0
virtual void clear()=0
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
Definition compiler.h:31
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)
Definition compiler.h:136
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:65