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