3#include <StormByte/crypto/keypair.hxx>
4#include <StormByte/crypto/exception.hxx>
5#include <StormByte/crypto/algorithm.hxx>
6#include <StormByte/expected.hxx>
14namespace StormByte::Crypto {
22 class STORMBYTE_CRYPTO_PUBLIC
Secret final {
33 explicit Secret(
const Algorithm::SecretShare& algorithm,
const KeyPair& key_pair)
noexcept;
44 explicit Secret(
const Algorithm::SecretShare& algorithm,
KeyPair&& key_pair)
noexcept;
98 void PeerPublicKey(const std::
string& peer_public_key) noexcept;
109 Expected<std::
string,
Exception> Content() const noexcept;
124 std::
string m_peer_public_key;
A class representing an exception in the crypto module.
Definition exception.hxx:15
A class representing a public/private key pair.
Definition keypair.hxx:23
A class for managing shared secret operations.
Definition secret.hxx:22
Secret(const Secret &secret)=default
Copy constructor for the Secret class.
Secret(Secret &&secret) noexcept=default
Move constructor for the Secret class.
~Secret() noexcept=default
Destructor for the Secret class.
Secret(const Algorithm::SecretShare &algorithm, const KeyPair &key_pair) noexcept
Constructs a Secret instance with an algorithm and a key pair.
Secret(const Algorithm::SecretShare &algorithm, KeyPair &&key_pair) noexcept
Constructs a Secret instance with an algorithm and a key pair (move version).
The namespace containing cryptographic algorithms.