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