Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
Poly1305 Class Reference

C++ wrapper with std::byte span interface around poly1305_donna code. More...

#include <poly1305.h>

Collaboration diagram for Poly1305:
[legend]

Public Member Functions

 Poly1305 (std::span< const std::byte > key) noexcept
 Construct a Poly1305 object with a given 32-byte key.
Poly1305Update (std::span< const std::byte > msg) noexcept
 Process message bytes.
void Finalize (std::span< std::byte > out) noexcept
 Write authentication tag to 16-byte out.

Static Public Attributes

static constexpr unsigned TAGLEN {16}
 Length of the output produced by Finalize().
static constexpr unsigned KEYLEN {32}
 Length of the keys expected by the constructor.

Private Attributes

poly1305_donna::poly1305_context m_ctx

Detailed Description

C++ wrapper with std::byte span interface around poly1305_donna code.

Definition at line 38 of file poly1305.h.

Constructor & Destructor Documentation

◆ Poly1305()

Poly1305::Poly1305 ( std::span< const std::byte > key)
inlinenoexcept

Construct a Poly1305 object with a given 32-byte key.

Definition at line 50 of file poly1305.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ Finalize()

void Poly1305::Finalize ( std::span< std::byte > out)
inlinenoexcept

Write authentication tag to 16-byte out.

Definition at line 64 of file poly1305.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Update()

Poly1305 & Poly1305::Update ( std::span< const std::byte > msg)
inlinenoexcept

Process message bytes.

Definition at line 57 of file poly1305.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ KEYLEN

unsigned Poly1305::KEYLEN {32}
staticconstexpr

Length of the keys expected by the constructor.

Definition at line 47 of file poly1305.h.

◆ m_ctx

poly1305_donna::poly1305_context Poly1305::m_ctx
private

Definition at line 40 of file poly1305.h.

◆ TAGLEN

unsigned Poly1305::TAGLEN {16}
staticconstexpr

Length of the output produced by Finalize().

Definition at line 44 of file poly1305.h.


The documentation for this class was generated from the following file: