3#include <StormByte/crypto/algorithm.hxx>
4#include <StormByte/crypto/exception.hxx>
5#include <StormByte/expected.hxx>
14namespace StormByte::Crypto {
23 class STORMBYTE_CRYPTO_PUBLIC
KeyPair final {
34 KeyPair(
const std::string& pub,
const std::string& priv)
noexcept;
54 KeyPair(std::string&& pub, std::string&& priv)
noexcept;
119 const std::
string& PublicKey() const noexcept;
129 const std::optional<std::
string>& PrivateKey() const noexcept;
192 std::
string m_public_key;
193 std::optional<std::
string> m_private_key;
A class for managing asymmetric encryption and decryption.
Definition asymetric.hxx:17
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
KeyPair(std::string &&pub) noexcept
Constructs a KeyPair with a public key only (move version).
KeyPair(const std::string &pub, const std::string &priv) noexcept
Constructs a KeyPair with a public and private key.
KeyPair(const std::string &pub) noexcept
Constructs a KeyPair with a public key only.
KeyPair(KeyPair &&other) noexcept=default
Move constructor.
KeyPair(const KeyPair &other)=default
Copy constructor.
~KeyPair() noexcept=default
Destructor.
KeyPair(std::string &&pub, std::string &&priv) noexcept
Constructs a KeyPair with a public and private key (move version).
The namespace containing cryptographic algorithms.