5#ifndef BITCOIN_CRYPTO_POLY1305_H
6#define BITCOIN_CRYPTO_POLY1305_H
14#define POLY1305_BLOCK_SIZE 16
43 static constexpr unsigned TAGLEN{16};
46 static constexpr unsigned KEYLEN{32};
C++ wrapper with std::byte Span interface around poly1305_donna code.
poly1305_donna::poly1305_context m_ctx
static constexpr unsigned KEYLEN
Length of the keys expected by the constructor.
Poly1305 & Update(Span< const std::byte > msg) noexcept
Process message bytes.
void Finalize(Span< std::byte > out) noexcept
Write authentication tag to 16-byte out.
static constexpr unsigned TAGLEN
Length of the output produced by Finalize().
Poly1305(Span< const std::byte > key) noexcept
Construct a Poly1305 object with a given 32-byte key.
void poly1305_update(poly1305_context *st, const unsigned char *m, size_t bytes) noexcept
void poly1305_init(poly1305_context *st, const unsigned char key[32]) noexcept
void poly1305_finish(poly1305_context *st, unsigned char mac[16]) noexcept
#define POLY1305_BLOCK_SIZE
unsigned char * UCharCast(char *c)