StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
x25519.hxx
1#pragma once
2
3#include <StormByte/crypto/keypair/generic.hxx>
4
5namespace StormByte::Crypto::KeyPair {
6 class STORMBYTE_CRYPTO_PUBLIC X25519 final: public Generic {
7 public:
8 inline X25519(const std::string& public_key, std::optional<std::string> private_key = std::nullopt):
9 Generic(Type::X25519, public_key, private_key) {}
10
11 X25519(const X25519& other) = default;
12 X25519(X25519&& other) noexcept = default;
13 ~X25519() noexcept = default;
14 X25519& operator=(const X25519& other) = default;
15 X25519& operator=(X25519&& other) noexcept = default;
16
17 PointerType Clone() const noexcept override { return std::make_shared<X25519>(*this); }
18 PointerType Move() noexcept override { return std::make_shared<X25519>(std::move(*this)); }
19
20 static PointerType Generate(unsigned short key_size = 256) noexcept;
21 };
22}
A generic class.
Definition generic.hxx:34
Definition x25519.hxx:6