8#include <botan/internal/x919_mac.h> 
   10#include <botan/mem_ops.h> 
   11#include <botan/internal/stl_util.h> 
   18void ANSI_X919_MAC::add_data(std::span<const uint8_t> input) {
 
   21   BufferSlicer in(input);
 
   23   const auto to_be_xored = in.take(std::min(8 - m_position, in.remaining()));
 
   24   xor_buf(&m_state[m_position], to_be_xored.data(), to_be_xored.size());
 
   25   m_position += to_be_xored.size();
 
   31   m_des1->encrypt(m_state);
 
   32   while(in.remaining() >= 8) {
 
   33      xor_buf(m_state, in.take(8).data(), 8);
 
   34      m_des1->encrypt(m_state);
 
   37   const auto remaining = in.take(in.remaining());
 
   38   xor_buf(m_state, remaining.data(), remaining.size());
 
   39   m_position = remaining.size();
 
   45void ANSI_X919_MAC::final_result(std::span<uint8_t> mac) {
 
   47      m_des1->encrypt(m_state);
 
   49   m_des2->decrypt(m_state.data(), mac.data());
 
   50   m_des1->encrypt(mac.data());
 
   56   return m_des1->has_keying_material() && m_des2->has_keying_material();
 
 
   62void ANSI_X919_MAC::key_schedule(std::span<const uint8_t> key) {
 
   65   m_des1->set_key(key.first(8));
 
   67   if(key.size() == 16) {
 
   71   m_des2->set_key(key.first(8));
 
   89   return std::make_unique<ANSI_X919_MAC>();
 
 
std::unique_ptr< MessageAuthenticationCode > new_object() const override
 
std::string name() const override
 
bool has_keying_material() const override
 
static std::unique_ptr< MessageAuthenticationCode > create_or_throw(std::string_view algo_spec, std::string_view provider="")
 
void assert_key_material_set() const
 
void zeroise(std::vector< T, Alloc > &vec)
 
void zap(std::vector< T, Alloc > &vec)
 
constexpr void xor_buf(ranges::contiguous_output_range< uint8_t > auto &&out, ranges::contiguous_range< uint8_t > auto &&in)