Botan 3.10.0
Crypto and TLS for C&
ascon_hash256.h
Go to the documentation of this file.
1/*
2* Ascon-Hash256 (NIST SP.800-232)
3* (C) 2025 Jack Lloyd
4* 2025 René Meusel
5*
6* Botan is released under the Simplified BSD License (see license.txt)
7*/
8
9#ifndef BOTAN_ASCON_HASH256_H_
10#define BOTAN_ASCON_HASH256_H_
11
12#include <botan/hash.h>
13#include <botan/internal/ascon_perm.h>
14
15namespace Botan {
16
17/**
18* Ascon-Hash256 (NIST SP.800-232 Section 5.1)
19*/
21 public:
23
24 size_t output_length() const override { return 32; }
25
26 std::string name() const override { return "Ascon-Hash256"; }
27
28 std::string provider() const override { return m_ascon_p.provider(); }
29
30 void clear() override;
31
32 std::unique_ptr<HashFunction> new_object() const override;
33 std::unique_ptr<HashFunction> copy_state() const override;
34
35 private:
36 void add_data(std::span<const uint8_t> input) override;
37 void final_result(std::span<uint8_t> out) override;
38
39 private:
40 Ascon_p m_ascon_p;
41};
42
43} // namespace Botan
44
45#endif
void clear() override
std::unique_ptr< HashFunction > copy_state() const override
size_t output_length() const override
std::unique_ptr< HashFunction > new_object() const override
std::string provider() const override
std::string name() const override
void final(uint8_t out[])
Definition buf_comp.h:69