StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
dsa.hxx
1#pragma once
2
3#include <StormByte/crypto/keypair/generic.hxx>
4
9namespace StormByte::Crypto::KeyPair {
14 class STORMBYTE_CRYPTO_PUBLIC DSA final: public Generic {
15 public:
21 inline DSA(const std::string& public_key, std::optional<std::string> private_key = std::nullopt):
22 Generic(Type::DSA, public_key, private_key) {}
23
28 DSA(const DSA& other) = default;
29
34 DSA(DSA&& other) noexcept = default;
35
39 ~DSA() noexcept = default;
40
46 DSA& operator=(const DSA& other) = default;
47
53 DSA& operator=(DSA&& other) noexcept = default;
54
59 PointerType Clone() const noexcept override {
60 return std::make_shared<DSA>(*this);
61 }
62
67 PointerType Move() noexcept override {
68 return std::make_shared<DSA>(std::move(*this));
69 }
70
76 static PointerType Generate(unsigned short key_size = 2048) noexcept;
77 };
78}
A DSA keypair class.
Definition dsa.hxx:14
DSA(const DSA &other)=default
Copy constructor.
~DSA() noexcept=default
Virtual destructor.
DSA(DSA &&other) noexcept=default
Move constructor.
static PointerType Generate(unsigned short key_size=2048) noexcept
Generate a new DSA keypair.
PointerType Move() noexcept override
Move the DSA keypair.
Definition dsa.hxx:67
DSA(const std::string &public_key, std::optional< std::string > private_key=std::nullopt)
Constructor.
Definition dsa.hxx:21
A generic class.
Definition generic.hxx:34