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::Serpent Class Referencefinal

A symmetric crypter class. More...

#include <serpent.hxx>

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

Public Member Functions

 Serpent (const std::string &password)
 Constructor.
 
 Serpent (const Serpent &other)=default
 Copy constructor.
 
 Serpent (Serpent &&other) noexcept=default
 Move constructor.
 
virtual ~Serpent () noexcept=default
 Virtual destructor.
 
Serpentoperator= (const Serpent &other)=default
 Copy assignment operator.
 
Serpentoperator= (Serpent &&other) noexcept=default
 Move assignment operator.
 
PointerType Clone () const noexcept override
 Clone the Serpent crypter.
 
PointerType Move () noexcept override
 Move the Serpent 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

◆ Serpent() [1/3]

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

Constructor.

Parameters
typeThe type of crypter.

◆ Serpent() [2/3]

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

Copy constructor.

Parameters
otherThe other Serpent crypter to copy from.

◆ Serpent() [3/3]

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

Move constructor.

Parameters
otherThe other Serpent crypter to move from.

Member Function Documentation

◆ Clone()

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

Clone the Serpent crypter.

Returns
A pointer to the cloned Serpent crypter.

◆ Move()

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

Move the Serpent crypter.

Returns
A pointer to the moved Serpent crypter.

◆ operator=() [1/2]

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

Copy assignment operator.

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

◆ operator=() [2/2]

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

Move assignment operator.

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

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