StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StormByte::Crypto::Signer::RSA Class Referencefinal

A generic signer signer class. More...

#include <rsa.hxx>

Inheritance diagram for StormByte::Crypto::Signer::RSA:
Inheritance graph
[legend]
Collaboration diagram for StormByte::Crypto::Signer::RSA:
Collaboration graph
[legend]

Public Member Functions

 RSA (KeyPair::Generic::PointerType keypair)
 Constructor.
 
 RSA (const KeyPair::RSA &keypair)
 Constructor.
 
 RSA (KeyPair::RSA &&keypair)
 Constructor.
 
 RSA (const RSA &other)=default
 Copy constructor.
 
 RSA (RSA &&other) noexcept=default
 Move constructor.
 
 ~RSA () noexcept=default
 Virtual destructor.
 
RSAoperator= (const RSA &other)=default
 Copy assignment operator.
 
RSAoperator= (RSA &&other) noexcept=default
 Move assignment operator.
 
PointerType Clone () const noexcept override
 Clone the RSA signer.
 
PointerType Move () noexcept override
 Move the RSA signer.
 
- Public Member Functions inherited from StormByte::Crypto::Signer::Generic
 Generic (const Generic &other)=default
 Copy constructor.
 
 Generic (Generic &&other) noexcept=default
 Move constructor.
 
virtual ~Generic () noexcept=default
 Virtual destructor.
 
Genericoperator= (const Generic &other)=default
 Copy assignment operator.
 
Genericoperator= (Generic &&other) noexcept=default
 Move assignment operator.
 
KeyPair::Generic::PointerType KeyPair () const noexcept
 Gets the keypair used for asymmetric encryption.
 
bool Sign (std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
 Sign data from input span to output buffer.
 
bool Sign (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Sign data from input buffer to output buffer.
 
bool Sign (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Sign data from input buffer to output buffer, moving the input data.
 
Buffer::Consumer Sign (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
 Sign data from a Consumer buffer.
 
bool Verify (std::span< const std::byte > input, const std::string &signature) const noexcept
 Verify data from input span to output buffer.
 
bool Verify (const Buffer::ReadOnly &input, const std::string &signature) const noexcept
 Verify data from input buffer to output buffer.
 
bool Verify (Buffer::ReadOnly &input, const std::string &signature) const noexcept
 Verify data from input buffer to output buffer, moving the input data.
 
bool Verify (Buffer::Consumer consumer, const std::string &signature, ReadMode mode=ReadMode::Move) const noexcept
 Verify data from a Consumer buffer.
 

Additional Inherited Members

- Protected Member Functions inherited from StormByte::Crypto::Signer::Generic
 Generic (enum Type type, KeyPair::Generic::PointerType keypair)
 Constructor.
 
 Generic (enum Type type, const KeyPair::Generic &keypair)
 Constructor.
 
 Generic (enum Type type, KeyPair::Generic &&keypair)
 Constructor.
 
- Protected Attributes inherited from StormByte::Crypto::Signer::Generic
enum Type m_type
 The type of signer.
 
KeyPair::Generic::PointerType m_keypair
 The password used for asymmetric encryption.
 

Detailed Description

A generic signer signer class.

Constructor & Destructor Documentation

◆ RSA() [1/5]

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

Constructor.

Parameters
typeThe type of signer.
keypairThe keypair used for asymmetric encryption.

◆ RSA() [2/5]

StormByte::Crypto::Signer::RSA::RSA ( const KeyPair::RSA keypair)
inline

Constructor.

Parameters
typeThe type of signer.
keypairThe keypair used for asymmetric encryption.

◆ RSA() [3/5]

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

Constructor.

Parameters
typeThe type of signer.
keypairThe keypair used for asymmetric encryption.

◆ RSA() [4/5]

StormByte::Crypto::Signer::RSA::RSA ( const RSA other)
default

Copy constructor.

Parameters
otherThe other RSA signer to copy from.

◆ RSA() [5/5]

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

Move constructor.

Parameters
otherThe other RSA signer to move from.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Signer::RSA::Clone ( ) const
inlineoverridenoexcept

Clone the RSA signer.

Returns
A pointer to the cloned RSA signer.

◆ Move()

PointerType StormByte::Crypto::Signer::RSA::Move ( )
inlineoverridenoexcept

Move the RSA signer.

Returns
A pointer to the moved RSA signer.

◆ operator=() [1/2]

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

Copy assignment operator.

Parameters
otherThe other RSA signer to copy from.
Returns
Reference to this RSA signer.

◆ operator=() [2/2]

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

Move assignment operator.

Parameters
otherThe other RSA signer to move from.
Returns
Reference to this RSA signer.

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