8#ifndef BOTAN_MESSAGE_AUTH_CODE_BASE_H_
9#define BOTAN_MESSAGE_AUTH_CODE_BASE_H_
11#include <botan/buf_comp.h>
12#include <botan/sym_algo.h>
32 static std::unique_ptr<MessageAuthenticationCode>
create(std::string_view algo_spec,
42 static std::unique_ptr<MessageAuthenticationCode>
create_or_throw(std::string_view algo_spec,
48 static std::vector<std::string>
providers(std::string_view algo_spec);
70 void start(
const uint8_t nonce[],
size_t nonce_len) {
start_msg({nonce, nonce_len}); }
95 virtual std::unique_ptr<MessageAuthenticationCode>
new_object()
const = 0;
106 virtual std::string
provider()
const {
return "base"; }
123 virtual void start_msg(std::span<const uint8_t> nonce);
128 virtual bool verify_mac_result(std::span<const uint8_t> in);
#define BOTAN_PUBLIC_API(maj, min)
virtual bool verify_mac_result(std::span< const uint8_t > in)
bool verify_mac(std::span< const uint8_t > in)
virtual bool fresh_key_required_per_message() const
static std::unique_ptr< MessageAuthenticationCode > create_or_throw(std::string_view algo_spec, std::string_view provider="")
virtual std::unique_ptr< MessageAuthenticationCode > new_object() const =0
static std::unique_ptr< MessageAuthenticationCode > create(std::string_view algo_spec, std::string_view provider="")
virtual std::string provider() const
virtual void start_msg(std::span< const uint8_t > nonce)
bool verify_mac(const uint8_t in[], size_t length)
static std::vector< std::string > providers(std::string_view algo_spec)
void start(std::span< const uint8_t > nonce)
MessageAuthenticationCode * clone() const
void start(const uint8_t nonce[], size_t nonce_len)
SymmetricAlgorithm()=default
MessageAuthenticationCode MAC