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


Public Member Functions | |
| Type | Type () const noexcept |
| Algorithm of this instance. | |
| virtual StormByte::Safe::Optional< Secure::Password > | Share (const StormByte::Safe::String &peerPublicKey) const =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 & | operator= (const Clonable &)=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.
|
default |
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. |
Copy assignment.
| other | Object to copy. |
Move assignment.
| other | Object to move. |
|
pure virtual |
Derive a shared secret from a peer public key.
| peerPublicKey | Peer public key as Base64, borrowed for this call. |
| StormByte::Exception | If Safe result storage cannot be created. |
Implemented in StormByte::Crypto::Secret::ECDH, and StormByte::Crypto::Secret::X25519.
|
inlinenoexcept |
Algorithm of this instance.
|
protected |
Local keypair (needs private key).
|
protected |
Algorithm.