An ED25519 keypair class.
More...
#include <ed25519.hxx>
|
| | ED25519 (const std::string &public_key, std::optional< std::string > private_key=std::nullopt) |
| | Constructor.
|
| |
| | ED25519 (const ED25519 &other)=default |
| | Copy constructor.
|
| |
| | ED25519 (ED25519 &&other) noexcept=default |
| | Move constructor.
|
| |
|
| ~ED25519 () noexcept=default |
| | Destructor.
|
| |
| ED25519 & | operator= (const ED25519 &other)=default |
| | Copy assignment operator.
|
| |
| ED25519 & | operator= (ED25519 &&other) noexcept=default |
| | Move assignment operator.
|
| |
| PointerType | Clone () const noexcept override |
| | Clone the ED25519 keypair.
|
| |
| PointerType | Move () noexcept override |
| | Move the ED25519 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 ED25519 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.
|
| |
An ED25519 keypair class.
◆ ED25519() [1/3]
| StormByte::Crypto::KeyPair::ED25519::ED25519 |
( |
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). |
◆ ED25519() [2/3]
| StormByte::Crypto::KeyPair::ED25519::ED25519 |
( |
const ED25519 & |
other | ) |
|
|
default |
Copy constructor.
- Parameters
-
| other | The other ED25519 keypair to copy from. |
◆ ED25519() [3/3]
| StormByte::Crypto::KeyPair::ED25519::ED25519 |
( |
ED25519 && |
other | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
| other | The other ED25519 keypair to move from. |
◆ Clone()
| PointerType StormByte::Crypto::KeyPair::ED25519::Clone |
( |
| ) |
const |
|
inlineoverridenoexcept |
Clone the ED25519 keypair.
- Returns
- A pointer to the cloned ED25519 keypair.
◆ Generate()
| static PointerType StormByte::Crypto::KeyPair::ED25519::Generate |
( |
unsigned short |
key_size = 256 | ) |
|
|
staticnoexcept |
Generates a new ED25519 keypair.
- Parameters
-
| key_size | The key size in bits (must be 256 for ED25519). |
- Returns
- A pointer to the generated ED25519 keypair, or nullptr on failure.
◆ Move()
| PointerType StormByte::Crypto::KeyPair::ED25519::Move |
( |
| ) |
|
|
inlineoverridenoexcept |
Move the ED25519 keypair.
- Returns
- A pointer to the moved ED25519 keypair.
◆ operator=() [1/2]
| ED25519 & StormByte::Crypto::KeyPair::ED25519::operator= |
( |
const ED25519 & |
other | ) |
|
|
default |
Copy assignment operator.
- Parameters
-
| other | The other ED25519 keypair to copy from. |
- Returns
- Reference to this ED25519 keypair.
◆ operator=() [2/2]
| ED25519 & StormByte::Crypto::KeyPair::ED25519::operator= |
( |
ED25519 && |
other | ) |
|
|
defaultnoexcept |
Move assignment operator.
- Parameters
-
| other | The other ED25519 keypair to move from. |
- Returns
- Reference to this ED25519 keypair.
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-Crypto/StormByte-Crypto/lib/public/StormByte/crypto/keypair/ed25519.hxx