8#include <botan/x919_mac.h>
9#include <botan/internal/xor_buf.h>
17void ANSI_X919_MAC::add_data(
const byte input[],
size_t length)
19 size_t xored = std::min(8 - position, length);
20 xor_buf(&state[position], input, xored);
23 if(position < 8)
return;
43void ANSI_X919_MAC::final_result(
byte mac[])
47 d->decrypt(state, mac);
56void ANSI_X919_MAC::key_schedule(
const byte key[],
size_t length)
59 if(length == 8) d->set_key(key, 8);
60 else d->set_key(key + 8, 8);
88 e(e_in), d(e->
clone()), state(e->block_size()), position(0)
90 if(e->name() !=
"DES")
ANSI_X919_MAC(BlockCipher *cipher)
MessageAuthenticationCode * clone() const
void zeroise(MemoryRegion< T > &vec)
void xor_buf(byte out[], const byte in[], size_t length)
std::invalid_argument Invalid_Argument