9#ifndef BOTAN_AEAD_CHACHA20_POLY1305_H_
10#define BOTAN_AEAD_CHACHA20_POLY1305_H_
12#include <botan/aead.h>
14#include <botan/stream_cipher.h>
31 std::string
name()
const override {
return "ChaCha20Poly1305"; }
41 size_t tag_size()
const override {
return 16; }
43 void clear()
override;
45 void reset()
override;
64 void start_msg(
const uint8_t nonce[],
size_t nonce_len)
override;
66 void key_schedule(std::span<const uint8_t> key)
override;
79 size_t process_msg(uint8_t buf[],
size_t size)
override;
96 size_t process_msg(uint8_t buf[],
size_t size)
override;
#define BOTAN_ARG_CHECK(expr, msg)
size_t output_length(size_t input_length) const override
size_t minimum_final_size() const override
size_t minimum_final_size() const override
size_t output_length(size_t input_length) const override
bool has_keying_material() const final
void set_associated_data_n(size_t idx, std::span< const uint8_t > ad) final
bool valid_nonce_length(size_t n) const override
secure_vector< uint8_t > m_ad
size_t ideal_granularity() const override
std::string name() const override
std::unique_ptr< StreamCipher > m_chacha
size_t update_granularity() const override
bool cfrg_version() const
size_t tag_size() const override
bool associated_data_requires_key() const override
void update_len(size_t len)
Key_Length_Specification key_spec() const override
std::unique_ptr< MessageAuthenticationCode > m_poly1305
int(* final)(unsigned char *, CTX *)
std::vector< T, secure_allocator< T > > secure_vector