8 #include <botan/x919_mac.h> 9 #include <botan/internal/xor_buf.h> 17 void 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;
43 void ANSI_X919_MAC::final_result(
byte mac[])
56 void ANSI_X919_MAC::key_schedule(
const byte key[],
size_t length)
59 if(length == 8) d->
set_key(key, 8);
88 e(e_in), d(e->clone()), state(e->block_size()), position(0)
90 if(e->
name() !=
"DES")
virtual BlockCipher * clone() const =0
std::invalid_argument Invalid_Argument
void decrypt(const byte in[], byte out[]) const
void encrypt(const byte in[], byte out[]) const
void set_key(const SymmetricKey &key)
ANSI_X919_MAC(BlockCipher *cipher)
virtual std::string name() const =0
MessageAuthenticationCode * clone() const
void xor_buf(byte out[], const byte in[], size_t length)
void zeroise(MemoryRegion< T > &vec)