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

ECDSA signer. More...

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

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

Public Member Functions

PointerType Clone () const noexcept override
 Clone this signer.
 
PointerType Move () noexcept override
 Move this signer into a new instance.
 
Construction
 ECDSA (KeyPair::Generic::PointerType keypair)
 Construct from a keypair pointer.
 
 ECDSA (const KeyPair::ECDSA &keypair)
 Construct by cloning an ECDSA keypair.
 
 ECDSA (KeyPair::ECDSA &&keypair)
 Construct by moving an ECDSA keypair.
 
 ECDSA (const ECDSA &other)=default
 Copy constructor.
 
 ECDSA (ECDSA &&other) noexcept=default
 Move constructor.
 
 ~ECDSA () noexcept
 Destructor.
 
ECDSA & operator= (const ECDSA &other)=default
 Copy assignment.
 
ECDSA & operator= (ECDSA &&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 (const Clonable &)=default
 
constexpr Clonable (Clonable &&) noexcept=default
 
constexpr Clonable & operator= (const Clonable &)=default
 
constexpr Clonable & operator= (Clonable &&) noexcept=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

ECDSA signer.

Constructor & Destructor Documentation

◆ ECDSA() [1/5]

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

Construct from a keypair pointer.

Parameters
keypairKeypair.

◆ ECDSA() [2/5]

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

Construct by cloning an ECDSA keypair.

Parameters
keypairKeypair.

◆ ECDSA() [3/5]

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

Construct by moving an ECDSA keypair.

Parameters
keypairKeypair.

◆ ECDSA() [4/5]

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

Copy constructor.

Parameters
otherSigner to copy.

◆ ECDSA() [5/5]

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

Move constructor.

Parameters
otherSigner to move.

◆ ~ECDSA()

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

Destructor.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Signer::ECDSA::Clone ( ) const
inlineoverridevirtualnoexcept

Clone this signer.

Returns
Shared pointer to the clone.

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

◆ Move()

PointerType StormByte::Crypto::Signer::ECDSA::Move ( )
inlineoverridevirtualnoexcept

Move this signer into a new instance.

Returns
Shared pointer to the moved signer.

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

◆ operator=() [1/2]

Copy assignment.

Parameters
otherSigner to copy.
Returns
Reference to this signer.

◆ operator=() [2/2]

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

Move assignment.

Parameters
otherSigner to move.
Returns
Reference to this signer.

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