35 void update(
const uint8_t in[],
size_t length) { add_data({in, length}); }
41 void update(std::span<const uint8_t> in) { add_data(in); }
43 void update_be(uint16_t val);
44 void update_be(uint32_t val);
45 void update_be(uint64_t val);
47 void update_le(uint16_t val);
48 void update_le(uint32_t val);
49 void update_le(uint64_t val);
62 void update(uint8_t in) { add_data({&in, 1}); }
70 void final(uint8_t out[]) { final_result({out, output_length()}); }
77 template <concepts::resizable_
byte_buffer T = secure_vector<u
int8_t>>
79 T output(output_length());
84 std::vector<uint8_t>
final_stdvec() {
return final<std::vector<uint8_t>>(); }
86 void final(std::span<uint8_t> out) {
87 BOTAN_ARG_CHECK(out.size() >= output_length(),
"provided output buffer has insufficient capacity");
91 template <concepts::resizable_
byte_buffer T>
93 out.resize(output_length());
104 template <concepts::resizable_
byte_buffer T = secure_vector<u
int8_t>>
116 template <concepts::resizable_
byte_buffer T = secure_vector<u
int8_t>>
128 template <concepts::resizable_
byte_buffer T = secure_vector<u
int8_t>>
141 virtual void add_data(std::span<const uint8_t> input) = 0;
147 virtual void final_result(std::span<uint8_t> out) = 0;