Abstract key-agreement object. More...
#include <StormByte/crypto/secret/generic.hxx>


Public Member Functions | |
| Type | Type () const noexcept |
| Algorithm of this instance. | |
| virtual std::optional< Secure::Password > | Share (std::string_view peerPublicKey) const noexcept=0 |
| Derive a shared secret from a peer public key. | |
Construction | |
| Generic (const Generic &other)=default | |
| Copy constructor. | |
| Generic (Generic &&other) noexcept=default | |
| Move constructor. | |
| virtual | ~Generic () noexcept |
| Destructor. | |
| Generic & | operator= (const Generic &other)=default |
| Copy assignment. | |
| Generic & | operator= (Generic &&other) noexcept=default |
| Move assignment. | |
Public Member Functions inherited from StormByte::Safe::Clonable< Generic > | |
| constexpr | Clonable ()=default |
| constexpr | Clonable (const Clonable &)=default |
| constexpr | Clonable (Clonable &&) noexcept=default |
| constexpr Clonable & | operator= (const Clonable &)=default |
| constexpr Clonable & | operator= (Clonable &&) noexcept=default |
| virtual constexpr | ~Clonable () noexcept=default |
| virtual PointerType | Clone () const =0 |
| virtual PointerType | Move ()=0 |
Protected Member Functions | |
| Generic (enum Type type, KeyPair::Generic::PointerType keypair) noexcept | |
| Construct with algorithm and keypair. | |
Protected Attributes | |
| enum Type | m_type |
| Algorithm. | |
| KeyPair::Generic::PointerType | m_keypair |
| Local keypair (needs private key) | |
Additional Inherited Members | |
Public Types inherited from StormByte::Safe::Clonable< Generic > | |
| typedef SmartPointer | PointerType |
Static Public Member Functions inherited from StormByte::Safe::Clonable< Generic > | |
| static PointerType | MakePointer (Args &&... args) |
Abstract key-agreement object.
Holds a local keypair and derives a shared secret from a peer public key.
Copy constructor.
| other | Object to copy. |
|
defaultnoexcept |
Move constructor.
| other | Object to move. |
|
virtualnoexcept |
Destructor.
|
inlineprotectednoexcept |
Construct with algorithm and keypair.
| type | Algorithm. |
| keypair | Local keypair. |
|
default |
Copy assignment.
| other | Object to copy. |
|
defaultnoexcept |
Move assignment.
| other | Object to move. |
|
pure virtualnoexcept |
Derive a shared secret from a peer public key.
| peerPublicKey | Peer public key as Base64. Accepts String and std::string via string_view. |
Implemented in StormByte::Crypto::Secret::ECDH, and StormByte::Crypto::Secret::X25519.
|
inlinenoexcept |
Algorithm of this instance.
|
protected |
Local keypair (needs private key)