An ECDSA keypair class.
More...
#include <ecdsa.hxx>
|
| | ECDSA (const std::string &public_key, std::optional< std::string > private_key=std::nullopt) |
| | Constructor.
|
| |
| | ECDSA (const ECDSA &other)=default |
| | Copy constructor.
|
| |
| | ECDSA (ECDSA &&other) noexcept=default |
| | Move constructor.
|
| |
|
| ~ECDSA () noexcept=default |
| | Destructor.
|
| |
| ECDSA & | operator= (const ECDSA &other)=default |
| | Copy assignment operator.
|
| |
| ECDSA & | operator= (ECDSA &&other) noexcept=default |
| | Move assignment operator.
|
| |
| PointerType | Clone () const noexcept override |
| | Clone the ECDSA keypair.
|
| |
| PointerType | Move () noexcept override |
| | Move the ECDSA keypair.
|
| |
| | Generic (const Generic &other)=default |
| | Copy constructor.
|
| |
| | Generic (Generic &&other) noexcept=default |
| | Move constructor.
|
| |
|
virtual | ~Generic () noexcept=default |
| | Virtual destructor.
|
| |
| Generic & | operator= (const Generic &other)=default |
| | Copy assignment operator.
|
| |
| Generic & | operator= (Generic &&other) noexcept=default |
| | Move assignment operator.
|
| |
| const std::string & | PublicKey () const noexcept |
| | Gets the type of keypair.
|
| |
| const std::optional< std::string > & | PrivateKey () const noexcept |
| | Gets the private key of the keypair.
|
| |
| enum Type | Type () const noexcept |
| | Gets the type of keypair.
|
| |
| bool | Save (const std::filesystem::path &path, const std::string &name) const noexcept |
| | Saves the keypair to the specified file paths.
|
| |
|
| static PointerType | Generate (unsigned short key_size=256) noexcept |
| | Generates a new ECDSA keypair.
|
| |
|
| | Generic (enum Type type, const std::string &public_key, std::optional< std::string > private_key=std::nullopt) |
| | Constructor.
|
| |
|
enum Type | m_type |
| | The type of keypair.
|
| |
|
std::string | m_public_key |
| | The public key.
|
| |
|
std::optional< std::string > | m_private_key |
| | The private key.
|
| |
◆ ECDSA() [1/3]
| StormByte::Crypto::KeyPair::ECDSA::ECDSA |
( |
const std::string & |
public_key, |
|
|
std::optional< std::string > |
private_key = std::nullopt |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| public_key | The public key. |
| private_key | The private key (optional). |
◆ ECDSA() [2/3]
| StormByte::Crypto::KeyPair::ECDSA::ECDSA |
( |
const ECDSA & |
other | ) |
|
|
default |
Copy constructor.
- Parameters
-
| other | The other ECDSA keypair to copy from. |
◆ ECDSA() [3/3]
| StormByte::Crypto::KeyPair::ECDSA::ECDSA |
( |
ECDSA && |
other | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
| other | The other ECDSA keypair to move from. |
◆ Clone()
| PointerType StormByte::Crypto::KeyPair::ECDSA::Clone |
( |
| ) |
const |
|
inlineoverridenoexcept |
Clone the ECDSA keypair.
- Returns
- A pointer to the cloned ECDSA keypair.
◆ Generate()
| static PointerType StormByte::Crypto::KeyPair::ECDSA::Generate |
( |
unsigned short |
key_size = 256 | ) |
|
|
staticnoexcept |
Generates a new ECDSA keypair.
- Parameters
-
| key_size | The size of the key in bits (256, 384, or 521). |
- Returns
- A pointer to the generated ECDSA keypair, or nullptr on failure.
◆ Move()
| PointerType StormByte::Crypto::KeyPair::ECDSA::Move |
( |
| ) |
|
|
inlineoverridenoexcept |
Move the ECDSA keypair.
- Returns
- A pointer to the moved ECDSA keypair.
◆ operator=() [1/2]
| ECDSA & StormByte::Crypto::KeyPair::ECDSA::operator= |
( |
const ECDSA & |
other | ) |
|
|
default |
Copy assignment operator.
- Parameters
-
| other | The other ECDSA keypair to copy from. |
- Returns
- Reference to this ECDSA keypair.
◆ operator=() [2/2]
| ECDSA & StormByte::Crypto::KeyPair::ECDSA::operator= |
( |
ECDSA && |
other | ) |
|
|
defaultnoexcept |
Move assignment operator.
- Parameters
-
| other | The other ECDSA keypair to move from. |
- Returns
- Reference to this ECDSA keypair.
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-Crypto/StormByte-Crypto/lib/public/StormByte/crypto/keypair/ecdsa.hxx