32 static std::unique_ptr<MessageAuthenticationCode> create(std::string_view algo_spec,
33 std::string_view provider =
"");
42 static std::unique_ptr<MessageAuthenticationCode> create_or_throw(std::string_view algo_spec,
43 std::string_view provider =
"");
48 static std::vector<std::string> providers(std::string_view algo_spec);
65 void start(std::span<const uint8_t> nonce) { start_msg(nonce); }
72 void start(
const uint8_t nonce[],
size_t nonce_len) { start_msg({nonce, nonce_len}); }
77 void start() {
return start_msg({}); }
85 bool verify_mac(
const uint8_t in[],
size_t length) {
return verify_mac_result({in, length}); }
92 bool verify_mac(std::span<const uint8_t> in) {
return verify_mac_result(in); }
97 virtual std::unique_ptr<MessageAuthenticationCode>
new_object()
const = 0;
108 virtual std::string
provider()
const {
return "base"; }
125 virtual void start_msg(std::span<const uint8_t> nonce);
130 virtual bool verify_mac_result(std::span<const uint8_t> in);