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

A generic secret class. More...

#include <ecdh.hxx>

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

Public Member Functions

 ECDH (KeyPair::Generic::PointerType keypair)
 Constructor.
 
 ECDH (const KeyPair::ECDH &keypair)
 Constructor.
 
 ECDH (KeyPair::ECDH &&keypair)
 Constructor.
 
 ECDH (const ECDH &other)=default
 Copy constructor.
 
 ECDH (ECDH &&other) noexcept=default
 Move constructor.
 
 ~ECDH () noexcept=default
 Virtual destructor.
 
ECDHoperator= (const ECDH &other)=default
 Copy assignment operator.
 
ECDHoperator= (ECDH &&other) noexcept=default
 Move assignment operator.
 
PointerType Clone () const noexcept override
 Clone the ECDH secret.
 
PointerType Move () noexcept override
 Move the ECDH 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

◆ ECDH() [1/5]

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

Constructor.

Parameters
keypairThe keypair used for secret sharing.

◆ ECDH() [2/5]

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

Constructor.

Parameters
keypairThe keypair used for secret sharing.

◆ ECDH() [3/5]

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

Constructor.

Parameters
keypairThe keypair used for secret sharing.

◆ ECDH() [4/5]

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

Copy constructor.

Parameters
otherThe other ECDH secret to copy from.

◆ ECDH() [5/5]

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

Move constructor.

Parameters
otherThe other ECDH secret to move from.

Member Function Documentation

◆ Clone()

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

Clone the ECDH secret.

Returns
A pointer to the cloned ECDH secret.

◆ Move()

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

Move the ECDH secret.

Returns
A pointer to the moved ECDH secret.

◆ operator=() [1/2]

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

Copy assignment operator.

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

◆ operator=() [2/2]

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

Move assignment operator.

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

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