8 #include <botan/cmac.h>
9 #include <botan/internal/xor_buf.h>
19 const byte poly_xor = (in[0] & 0x80) ? polynomial : 0;
24 for(
size_t i = out.size(); i != 0; --i)
27 out[i-1] = (temp << 1) | carry;
31 out[out.size()-1] ^= poly_xor;
39 void CMAC::add_data(
const byte input[],
size_t length)
64 void CMAC::final_result(
byte mac[])
66 xor_buf(state, buffer, position);
74 state[position] ^= 0x80;
91 void CMAC::key_schedule(
const byte key[],
size_t length)
118 return "CMAC(" + e->
name() +
")";