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