31 XOF() : m_xof_started(false) {}
40 static std::unique_ptr<XOF> create(std::string_view algo_spec, std::string_view provider =
"");
49 static std::unique_ptr<XOF> create_or_throw(std::string_view algo_spec, std::string_view provider =
"");
55 static std::vector<std::string> providers(std::string_view algo_spec);
61 virtual std::string provider()
const;
67 m_xof_started =
false;
74 virtual std::string
name()
const = 0;
86 void start(std::span<const uint8_t> salt = {}, std::span<const uint8_t> key = {});
142 void update(std::span<const uint8_t> input) {
154 template <concepts::resizable_
byte_buffer T = secure_vector<u
int8_t>>
164 template <
size_t count>
166 std::array<uint8_t, count> out;
177 std::vector<uint8_t>
output_stdvec(
size_t bytes) {
return output<std::vector<uint8_t>>(bytes); }
183 void output(std::span<uint8_t> output) { generate_bytes(output); }
190 generate_bytes({&out, 1});
202 virtual void start_msg(std::span<const uint8_t> salt, std::span<const uint8_t> key);
215 virtual void add_data(std::span<const uint8_t> input) = 0;
227 virtual void generate_bytes(std::span<uint8_t> output) = 0;
232 virtual void reset() = 0;