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

AES-CBC crypter. More...

#include <StormByte/crypto/crypter/symmetric/aes.hxx>

Inheritance diagram for StormByte::Crypto::Crypter::AES:
Collaboration diagram for StormByte::Crypto::Crypter::AES:

Public Member Functions

PointerType Clone () const noexcept override
 Clone this crypter.
 
PointerType Move () noexcept override
 Move this crypter into a new instance.
 
Construction
 AES (Secure::Password password)
 Construct with a password.
 
 AES (const AES &other)=default
 Copy constructor.
 
 AES (AES &&other) noexcept=default
 Move constructor.
 
 ~AES () noexcept
 Destructor.
 
AES & operator= (const AES &other)=default
 Copy assignment.
 
AES & operator= (AES &&other) noexcept=default
 Move assignment.
 
- Public Member Functions inherited from StormByte::Crypto::Crypter::Symmetric
const Secure::Password & Password () const noexcept
 Password used by this crypter.
 
 Symmetric (const Symmetric &other)=default
 Copy constructor.
 
 Symmetric (Symmetric &&other) noexcept=default
 Move constructor.
 
virtual ~Symmetric () noexcept override
 Destructor.
 
Symmetric & operator= (const Symmetric &other)=default
 Copy assignment.
 
Symmetric & operator= (Symmetric &&other) noexcept=default
 Move assignment.
 
- Public Member Functions inherited from StormByte::Crypto::Crypter::Generic
enum Type Type () const noexcept
 Cipher of this crypter.
 
 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 Encrypt (std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
 Encrypt a byte span.
 
template<StormByte::Type::ByteInputRange Range>
bool Encrypt (const Range &input, Buffer::WriteOnly &output) const
 Encrypt an input range of byte-convertible values.
 
bool Encrypt (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Encrypt a read-only buffer (copy).
 
bool Encrypt (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Encrypt a buffer, consuming it.
 
Buffer::Consumer Encrypt (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
 Encrypt a Consumer into another Consumer.
 
bool Decrypt (std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
 Decrypt a byte span.
 
template<StormByte::Type::ByteInputRange Range>
bool Decrypt (const Range &input, Buffer::WriteOnly &output) const
 Decrypt an input range of byte-convertible values.
 
bool Decrypt (const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Decrypt a read-only buffer (copy).
 
bool Decrypt (Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
 Decrypt a buffer, consuming it.
 
Buffer::Consumer Decrypt (Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
 Decrypt a Consumer into another 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::Crypto::Crypter::Symmetric
static Secure::Password RandomPassword (size_t length=32) noexcept
 Random password of raw bytes (not text).
 
- Static Public Member Functions inherited from StormByte::Safe::Clonable< Generic >
static PointerType MakePointer (Args &&... args)
 
- Protected Member Functions inherited from StormByte::Crypto::Crypter::Symmetric
 Symmetric (enum Type type, Secure::Password password)
 Construct with a cipher and a password.
 
- Protected Member Functions inherited from StormByte::Crypto::Crypter::Generic
 Generic (enum Type type)
 Construct with a cipher.
 
- Protected Attributes inherited from StormByte::Crypto::Crypter::Symmetric
Secure::Password m_password
 Shared password.
 
- Protected Attributes inherited from StormByte::Crypto::Crypter::Generic
enum Type m_type
 Cipher.
 

Detailed Description

AES-CBC crypter.

Constructor & Destructor Documentation

◆ AES() [1/3]

StormByte::Crypto::Crypter::AES::AES ( Secure::Password  password)
inline

Construct with a password.

Parameters
passwordPassword.

◆ AES() [2/3]

StormByte::Crypto::Crypter::AES::AES ( const AES &  other)
default

Copy constructor.

Parameters
otherCrypter to copy.

◆ AES() [3/3]

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

Move constructor.

Parameters
otherCrypter to move.

◆ ~AES()

StormByte::Crypto::Crypter::AES::~AES ( )
noexcept

Destructor.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Crypter::AES::Clone ( ) const
inlineoverridevirtualnoexcept

Clone this crypter.

Returns
Shared pointer to the clone.

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

◆ Move()

PointerType StormByte::Crypto::Crypter::AES::Move ( )
inlineoverridevirtualnoexcept

Move this crypter into a new instance.

Returns
Shared pointer to the moved crypter.

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

◆ operator=() [1/2]

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

Move assignment.

Parameters
otherCrypter to move.
Returns
Reference to this crypter.

◆ operator=() [2/2]

Copy assignment.

Parameters
otherCrypter to copy.
Returns
Reference to this crypter.

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