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::Secret::X25519 Class Referencefinal

A generic secret class. More...

#include <x25519.hxx>

Inheritance diagram for StormByte::Crypto::Secret::X25519:
Inheritance graph
[legend]
Collaboration diagram for StormByte::Crypto::Secret::X25519:
Collaboration graph
[legend]

Public Member Functions

 X25519 (KeyPair::Generic::PointerType keypair)
 Constructor.
 
 X25519 (const KeyPair::X25519 &keypair)
 Constructor.
 
 X25519 (KeyPair::X25519 &&keypair)
 Constructor.
 
 X25519 (const X25519 &other)=default
 Copy constructor.
 
 X25519 (X25519 &&other) noexcept=default
 Move constructor.
 
 ~X25519 () noexcept=default
 Virtual destructor.
 
X25519operator= (const X25519 &other)=default
 Copy assignment operator.
 
X25519operator= (X25519 &&other) noexcept=default
 Move assignment operator.
 
PointerType Clone () const noexcept override
 Clone the X25519 secret.
 
PointerType Move () noexcept override
 Move the X25519 secret.
 
- Public Member Functions inherited from StormByte::Crypto::Secret::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.
 
KeyPair::Generic::PointerType KeyPair () const noexcept
 Gets the keypair used for secret sharing.
 
enum Type Type () const noexcept
 Gets the type of the secret share generator used for secret sharing.
 
std::optional< std::string > Share (const std::string &peerPublicKey) const noexcept
 Shares the secret with a peer using their public key.
 

Additional Inherited Members

- Protected Member Functions inherited from StormByte::Crypto::Secret::Generic
 Generic (enum Type type, KeyPair::Generic::PointerType keypair)
 Constructor.
 
 Generic (enum Type type, const KeyPair::Generic &keypair)
 Constructor.
 
 Generic (enum Type type, KeyPair::Generic &&keypair)
 Constructor.
 
- Protected Attributes inherited from StormByte::Crypto::Secret::Generic
enum Type m_type
 The type of secret generator.
 
KeyPair::Generic::PointerType m_keypair
 The keypair used for secret sharing.
 

Detailed Description

A generic secret class.

Constructor & Destructor Documentation

◆ X25519() [1/5]

StormByte::Crypto::Secret::X25519::X25519 ( KeyPair::Generic::PointerType  keypair)
inline

Constructor.

Parameters
keypairThe keypair used for secret sharing.

◆ X25519() [2/5]

StormByte::Crypto::Secret::X25519::X25519 ( const KeyPair::X25519 keypair)
inline

Constructor.

Parameters
keypairThe keypair used for secret sharing.

◆ X25519() [3/5]

StormByte::Crypto::Secret::X25519::X25519 ( KeyPair::X25519 &&  keypair)
inline

Constructor.

Parameters
keypairThe keypair used for secret sharing.

◆ X25519() [4/5]

StormByte::Crypto::Secret::X25519::X25519 ( const X25519 other)
default

Copy constructor.

Parameters
otherThe other X25519 secret to copy from.

◆ X25519() [5/5]

StormByte::Crypto::Secret::X25519::X25519 ( X25519 &&  other)
defaultnoexcept

Move constructor.

Parameters
otherThe other X25519 secret to move from.

Member Function Documentation

◆ Clone()

PointerType StormByte::Crypto::Secret::X25519::Clone ( ) const
inlineoverridenoexcept

Clone the X25519 secret.

Returns
A pointer to the cloned X25519 secret.

◆ Move()

PointerType StormByte::Crypto::Secret::X25519::Move ( )
inlineoverridenoexcept

Move the X25519 secret.

Returns
A pointer to the moved X25519 secret.

◆ operator=() [1/2]

X25519 & StormByte::Crypto::Secret::X25519::operator= ( const X25519 other)
default

Copy assignment operator.

Parameters
otherThe other X25519 secret to copy from.
Returns
Reference to this X25519 secret.

◆ operator=() [2/2]

X25519 & StormByte::Crypto::Secret::X25519::operator= ( X25519 &&  other)
defaultnoexcept

Move assignment operator.

Parameters
otherThe other X25519 secret to move from.
Returns
Reference to this X25519 secret.

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