132 virtual std::optional<Secure::Password>
Share(std::string_view peerPublicKey)
const noexcept = 0;
144 : m_type(type), m_keypair(std::move(keypair)) {}
ECDH shared-secret derivation.
Definition ecdh.hxx:67
Abstract key-agreement object.
Definition generic.hxx:81
enum Type m_type
Algorithm.
Definition generic.hxx:135
Generic(Generic &&other) noexcept=default
Move constructor.
Generic(enum Type type, KeyPair::Generic::PointerType keypair) noexcept
Construct with algorithm and keypair.
Definition generic.hxx:143
virtual std::optional< Secure::Password > Share(std::string_view peerPublicKey) const noexcept=0
Derive a shared secret from a peer public key.
virtual ~Generic() noexcept
Destructor.
Generic(const Generic &other)=default
Copy constructor.
KeyPair::Generic::PointerType m_keypair
Local keypair (needs private key)
Definition generic.hxx:136
X25519 shared-secret derivation.
Definition x25519.hxx:67
Generic::PointerType Create(Type type, KeyPair::Generic::PointerType keypair) noexcept
Create an agreement object.
Root namespace of the StormByte suite.
#define STORMBYTE_CRYPTO_PUBLIC
Definition visibility.h:53