StormByte-Crypto 3.1.0
C++26 cryptography module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Crypto::Signer::ED25519 Class Referencefinal

Ed25519 signer. More...

#include <StormByte/crypto/signer/ed25519.hxx>

Inheritance diagram for StormByte::Crypto::Signer::ED25519:
Collaboration diagram for StormByte::Crypto::Signer::ED25519:

Public Member Functions

PointerType Clone () const noexcept override
 Clone this signer.
PointerType Move () noexcept override
 Move this signer into a new instance.
Construction
 ED25519 (KeyPair::Generic::PointerType keypair)
 Construct from a keypair pointer.
 ED25519 (const KeyPair::ED25519 &keypair)
 Construct by cloning an Ed25519 keypair.
 ED25519 (KeyPair::ED25519 &&keypair)
 Construct by moving an Ed25519 keypair.
 ED25519 (const ED25519 &other)=default
 Copy constructor.
 ED25519 (ED25519 &&other) noexcept=default
 Move constructor.
 ~ED25519 () noexcept
 Destructor.
ED25519 & operator= (const ED25519 &other)=default
 Copy assignment.
ED25519 & operator= (ED25519 &&other) noexcept=default
 Move assignment.
Public Member Functions inherited from StormByte::Crypto::Signer::Generic
KeyPair::Generic::PointerType KeyPair () const noexcept
 Keypair used to sign and verify.
 Generic (const Generic &other)=default
 Copy constructor.
 Generic (Generic &&other) noexcept=default
 Move constructor.
virtual ~Generic () noexcept
 Destructor.
Generic & operator= (const Generic &other)=default
 Copy assignment.
Generic & operator= (Generic &&other) noexcept=default
 Move assignment.
bool Sign (std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
 Sign a byte span.
template<StormByte::Type::ByteInputRange Range>
bool Sign (const Range &input, Buffer::WriteOnly &output) const
 Sign an input range of byte-convertible values.
bool Sign (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Sign a ReadOnly buffer (copy).
bool Sign (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Sign a ReadOnly buffer (move).
Buffer::Consumer Sign (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
 Sign a Consumer.
bool Verify (std::span< const std::byte > input, std::string_view signature) const noexcept
 Verify a byte span against a signature.
template<StormByte::Type::ByteInputRange Range>
bool Verify (const Range &input, std::string_view signature) const
 Verify an input range of byte-convertible values against a signature.
bool Verify (const Buffer::ReadOnly &input, std::string_view signature) const noexcept
 Verify a ReadOnly buffer (copy).
bool Verify (Buffer::ReadOnly &input, std::string_view signature) const noexcept
 Verify a ReadOnly buffer (move).
bool Verify (Buffer::Consumer consumer, std::string_view signature, ReadMode mode=ReadMode::Move) const noexcept
 Verify a Consumer.
Public Member Functions inherited from StormByte::Safe::Clonable< Generic >
constexpr Clonable ()=default
constexpr Clonable & operator= (const Clonable &)=default
virtual constexpr ~Clonable () noexcept=default

Additional Inherited Members

Public Types inherited from StormByte::Safe::Clonable< Generic >
typedef SmartPointer PointerType
Static Public Member Functions inherited from StormByte::Safe::Clonable< Generic >
static PointerType MakePointer (Args &&... args)
Protected Member Functions inherited from StormByte::Crypto::Signer::Generic
 Generic (enum Type type, KeyPair::Generic::PointerType keypair)
 Construct from a keypair pointer.
 Generic (enum Type type, const KeyPair::Generic &keypair)
 Construct by cloning a keypair.
 Generic (enum Type type, KeyPair::Generic &&keypair)
 Construct by moving a keypair.
Protected Attributes inherited from StormByte::Crypto::Signer::Generic
enum Type m_type
 Algorithm.
KeyPair::Generic::PointerType m_keypair
 Keypair.

Detailed Description

Ed25519 signer.

Note
MaybeSafe inherits all provider requirements of StormByte::Crypto::Signer::Generic. This leaf adds no fields; exported Clone/Move bind ownership callbacks in Crypto.

Constructor & Destructor Documentation

◆ ED25519() [1/5]

StormByte::Crypto::Signer::ED25519::ED25519 ( KeyPair::Generic::PointerType keypair)
inline

Construct from a keypair pointer.

Parameters
keypairKeypair.

◆ ED25519() [2/5]

StormByte::Crypto::Signer::ED25519::ED25519 ( const KeyPair::ED25519 & keypair)
inline

Construct by cloning an Ed25519 keypair.

Parameters
keypairKeypair.

◆ ED25519() [3/5]

StormByte::Crypto::Signer::ED25519::ED25519 ( KeyPair::ED25519 && keypair)
inline

Construct by moving an Ed25519 keypair.

Parameters
keypairKeypair.

◆ ED25519() [4/5]

StormByte::Crypto::Signer::ED25519::ED25519 ( const ED25519 & other)
default

Copy constructor.

Parameters
otherSigner to copy.

◆ ED25519() [5/5]

StormByte::Crypto::Signer::ED25519::ED25519 ( ED25519 && other)
defaultnoexcept

Move constructor.

Parameters
otherSigner to move.

◆ ~ED25519()

StormByte::Crypto::Signer::ED25519::~ED25519 ( )
noexcept

Destructor.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Signer::ED25519::Clone ( ) const
overridevirtualnoexcept

Clone this signer.

Returns
Shared pointer to the clone.

Implements StormByte::Safe::Clonable< Generic >.

◆ Move()

PointerType StormByte::Crypto::Signer::ED25519::Move ( )
overridevirtualnoexcept

Move this signer into a new instance.

Returns
Shared pointer to the moved signer.

Implements StormByte::Safe::Clonable< Generic >.

◆ operator=() [1/2]

ED25519 & StormByte::Crypto::Signer::ED25519::operator= ( const ED25519 & other)
default

Copy assignment.

Parameters
otherSigner to copy.
Returns
Reference to this signer.

◆ operator=() [2/2]

ED25519 & StormByte::Crypto::Signer::ED25519::operator= ( ED25519 && other)
defaultnoexcept

Move assignment.

Parameters
otherSigner to move.
Returns
Reference to this signer.

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