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::Crypter::Camellia Class Referencefinal

A symmetric crypter class. More...

#include <camellia.hxx>

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

Public Member Functions

 Camellia (const std::string &password)
 Constructor.
 
 Camellia (const Camellia &other)=default
 Copy constructor.
 
 Camellia (Camellia &&other) noexcept=default
 Move constructor.
 
virtual ~Camellia () noexcept=default
 Virtual destructor.
 
Camelliaoperator= (const Camellia &other)=default
 Copy assignment operator.
 
Camelliaoperator= (Camellia &&other) noexcept=default
 Move assignment operator.
 
PointerType Clone () const noexcept override
 Clone the Camellia crypter.
 
PointerType Move () noexcept override
 Move the Camellia crypter.
 
- Public Member Functions inherited from StormByte::Crypto::Crypter::Symmetric
 Symmetric (const Symmetric &other)=default
 Copy constructor.
 
 Symmetric (Symmetric &&other) noexcept=default
 Move constructor.
 
virtual ~Symmetric () noexcept=default
 Virtual destructor.
 
Symmetricoperator= (const Symmetric &other)=default
 Copy assignment operator.
 
Symmetricoperator= (Symmetric &&other) noexcept=default
 Move assignment operator.
 
const std::string & Password () const noexcept
 Gets the password used for symmetric 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.
 

Additional Inherited Members

- Static Public Member Functions inherited from StormByte::Crypto::Crypter::Symmetric
static std::string RandomPassword (size_t length=32) noexcept
 Generates a random password for symmetric encryption.
 
- Protected Member Functions inherited from StormByte::Crypto::Crypter::Symmetric
 Symmetric (enum Type type, const std::string &password)
 Constructor.
 
- Protected Member Functions inherited from StormByte::Crypto::Crypter::Generic
 Generic (enum Type type)
 Constructor.
 
- Protected Attributes inherited from StormByte::Crypto::Crypter::Symmetric
std::string m_password
 The password used for symmetric encryption.
 
- Protected Attributes inherited from StormByte::Crypto::Crypter::Generic
enum Type m_type
 The type of crypter.
 

Detailed Description

A symmetric crypter class.

Constructor & Destructor Documentation

◆ Camellia() [1/3]

StormByte::Crypto::Crypter::Camellia::Camellia ( const std::string &  password)
inline

Constructor.

Parameters
typeThe type of crypter.

◆ Camellia() [2/3]

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

Copy constructor.

Parameters
otherThe other Camellia crypter to copy from.

◆ Camellia() [3/3]

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

Move constructor.

Parameters
otherThe other Camellia crypter to move from.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Crypter::Camellia::Clone ( ) const
inlineoverridenoexcept

Clone the Camellia crypter.

Returns
A pointer to the cloned Camellia crypter.

◆ Move()

PointerType StormByte::Crypto::Crypter::Camellia::Move ( )
inlineoverridenoexcept

Move the Camellia crypter.

Returns
A pointer to the moved Camellia crypter.

◆ operator=() [1/2]

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

Move assignment operator.

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

◆ operator=() [2/2]

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

Copy assignment operator.

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

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