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 | Protected Member Functions | Protected Attributes | List of all members
StormByte::Crypto::Crypter::Asymmetric Class Reference

A generic asymmetric crypter class. More...

#include <generic.hxx>

Inheritance diagram for StormByte::Crypto::Crypter::Asymmetric:
Inheritance graph
[legend]
Collaboration diagram for StormByte::Crypto::Crypter::Asymmetric:
Collaboration graph
[legend]

Public Member Functions

 Asymmetric (const Asymmetric &other)=default
 Copy constructor.
 
 Asymmetric (Asymmetric &&other) noexcept=default
 Move constructor.
 
virtual ~Asymmetric () noexcept=default
 Virtual destructor.
 
Asymmetricoperator= (const Asymmetric &other)=default
 Copy assignment operator.
 
Asymmetricoperator= (Asymmetric &&other) noexcept=default
 Move assignment operator.
 
KeyPair::Generic::PointerType KeyPair () const noexcept
 Gets the keypair used for asymmetric encryption.
 
- Public Member Functions inherited from StormByte::Crypto::Crypter::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.
 
bool Encrypt (std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
 Encrypt data from input buffer to output buffer.
 
bool Encrypt (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Encrypt data from input buffer to output buffer.
 
bool Encrypt (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Encrypt data from input buffer to output buffer, moving the input data.
 
Buffer::Consumer Encrypt (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
 Encrypt data from a Consumer buffer.
 
bool Decrypt (std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
 Decrypt data from input buffer to output buffer.
 
bool Decrypt (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Decrypt data from input buffer to output buffer.
 
bool Decrypt (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Decrypt data from input buffer to output buffer, moving the input data.
 
Buffer::Consumer Decrypt (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
 Decrypt data from a Consumer buffer.
 
enum Type Type () const noexcept
 Gets the type of crypter.
 

Protected Member Functions

 Asymmetric (enum Type type, KeyPair::Generic::PointerType keypair)
 Constructor.
 
 Asymmetric (enum Type type, const KeyPair::Generic &keypair)
 Constructor.
 
 Asymmetric (enum Type type, KeyPair::Generic &&keypair)
 Constructor.
 
- Protected Member Functions inherited from StormByte::Crypto::Crypter::Generic
 Generic (enum Type type)
 Constructor.
 

Protected Attributes

KeyPair::Generic::PointerType m_keypair
 The password used for asymmetric encryption.
 
- Protected Attributes inherited from StormByte::Crypto::Crypter::Generic
enum Type m_type
 The type of crypter.
 

Detailed Description

A generic asymmetric crypter class.

Constructor & Destructor Documentation

◆ Asymmetric() [1/5]

StormByte::Crypto::Crypter::Asymmetric::Asymmetric ( const Asymmetric other)
default

Copy constructor.

Parameters
otherThe other Asymmetric crypter to copy from.

◆ Asymmetric() [2/5]

StormByte::Crypto::Crypter::Asymmetric::Asymmetric ( Asymmetric &&  other)
defaultnoexcept

Move constructor.

Parameters
otherThe other Asymmetric crypter to move from.

◆ Asymmetric() [3/5]

StormByte::Crypto::Crypter::Asymmetric::Asymmetric ( enum Type  type,
KeyPair::Generic::PointerType  keypair 
)
inlineprotected

Constructor.

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

◆ Asymmetric() [4/5]

StormByte::Crypto::Crypter::Asymmetric::Asymmetric ( enum Type  type,
const KeyPair::Generic keypair 
)
inlineprotected

Constructor.

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

◆ Asymmetric() [5/5]

StormByte::Crypto::Crypter::Asymmetric::Asymmetric ( enum Type  type,
KeyPair::Generic &&  keypair 
)
inlineprotected

Constructor.

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

Member Function Documentation

◆ KeyPair()

KeyPair::Generic::PointerType StormByte::Crypto::Crypter::Asymmetric::KeyPair ( ) const
inlinenoexcept

Gets the keypair used for asymmetric encryption.

Returns
The keypair.

◆ operator=() [1/2]

Asymmetric & StormByte::Crypto::Crypter::Asymmetric::operator= ( Asymmetric &&  other)
defaultnoexcept

Move assignment operator.

Parameters
otherThe other Asymmetric crypter to move from.
Returns
Reference to this Asymmetric crypter.

◆ operator=() [2/2]

Asymmetric & StormByte::Crypto::Crypter::Asymmetric::operator= ( const Asymmetric other)
default

Copy assignment operator.

Parameters
otherThe other Asymmetric crypter to copy from.
Returns
Reference to this Asymmetric crypter.

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