Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
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 (Span< const std::byte > key) noexcept
 Construct a Poly1305 object with a given 32-byte key. More...
 
Poly1305Update (Span< const std::byte > msg) noexcept
 Process message bytes. More...
 
void Finalize (Span< std::byte > out) noexcept
 Write authentication tag to 16-byte out. More...
 

Static Public Attributes

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

Private Attributes

poly1305_donna::poly1305_context m_ctx
 

Detailed Description

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

Definition at line 37 of file poly1305.h.

Constructor & Destructor Documentation

◆ Poly1305()

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

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

Definition at line 49 of file poly1305.h.

Here is the call graph for this function:

Member Function Documentation

◆ Finalize()

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

Write authentication tag to 16-byte out.

Definition at line 63 of file poly1305.h.

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

◆ Update()

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

Process message bytes.

Definition at line 56 of file poly1305.h.

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

Member Data Documentation

◆ KEYLEN

constexpr unsigned Poly1305::KEYLEN {32}
staticconstexpr

Length of the keys expected by the constructor.

Definition at line 46 of file poly1305.h.

◆ m_ctx

poly1305_donna::poly1305_context Poly1305::m_ctx
private

Definition at line 39 of file poly1305.h.

◆ TAGLEN

constexpr unsigned Poly1305::TAGLEN {16}
staticconstexpr

Length of the output produced by Finalize().

Definition at line 43 of file poly1305.h.


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