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

A symmetric crypter class. More...

#include <twofish.hxx>

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

Public Member Functions

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

◆ TwoFish() [1/3]

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

Constructor.

Parameters
typeThe type of crypter.

◆ TwoFish() [2/3]

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

Copy constructor.

Parameters
otherThe other TwoFish crypter to copy from.

◆ TwoFish() [3/3]

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

Move constructor.

Parameters
otherThe other TwoFish crypter to move from.

Member Function Documentation

◆ Clone()

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

Clone the TwoFish crypter.

Returns
A pointer to the cloned TwoFish crypter.

◆ Move()

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

Move the TwoFish crypter.

Returns
A pointer to the moved TwoFish crypter.

◆ operator=() [1/2]

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

Copy assignment operator.

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

◆ operator=() [2/2]

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

Move assignment operator.

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

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