A generic class.
More...
#include <generic.hxx>
|
| | 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.
|
| |
|
| | 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.
|
| |
◆ Generic() [1/3]
| StormByte::Crypto::KeyPair::Generic::Generic |
( |
const Generic & |
other | ) |
|
|
default |
Copy constructor.
- Parameters
-
| other | The other Generic keypair to copy from. |
◆ Generic() [2/3]
| StormByte::Crypto::KeyPair::Generic::Generic |
( |
Generic && |
other | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
| other | The other Generic keypair to move from. |
◆ Generic() [3/3]
| StormByte::Crypto::KeyPair::Generic::Generic |
( |
enum Type |
type, |
|
|
const std::string & |
public_key, |
|
|
std::optional< std::string > |
private_key = std::nullopt |
|
) |
| |
|
inlineprotected |
◆ operator=() [1/2]
| Generic & StormByte::Crypto::KeyPair::Generic::operator= |
( |
const Generic & |
other | ) |
|
|
default |
Copy assignment operator.
- Parameters
-
| other | The other Generic keypair to copy from. |
- Returns
- Reference to this Generic keypair.
◆ operator=() [2/2]
| Generic & StormByte::Crypto::KeyPair::Generic::operator= |
( |
Generic && |
other | ) |
|
|
defaultnoexcept |
Move assignment operator.
- Parameters
-
| other | The other Generic keypair to move from. |
- Returns
- Reference to this Generic keypair.
◆ PrivateKey()
| const std::optional< std::string > & StormByte::Crypto::KeyPair::Generic::PrivateKey |
( |
| ) |
const |
|
inlinenoexcept |
Gets the private key of the keypair.
- Returns
- The private key of the keypair.
◆ PublicKey()
| const std::string & StormByte::Crypto::KeyPair::Generic::PublicKey |
( |
| ) |
const |
|
inlinenoexcept |
Gets the type of keypair.
- Returns
- The type of keypair.
◆ Save()
| bool StormByte::Crypto::KeyPair::Generic::Save |
( |
const std::filesystem::path & |
path, |
|
|
const std::string & |
name |
|
) |
| const |
|
noexcept |
Saves the keypair to the specified file paths.
- Parameters
-
| path | The directory path to save the keys. |
| name | The base name for the key files. |
- Returns
- true if the keypair was saved successfully, false otherwise.
◆ Type()
| enum Type StormByte::Crypto::KeyPair::Generic::Type |
( |
| ) |
const |
|
inlinenoexcept |
Gets the type of keypair.
- Returns
- The type of keypair.
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-Crypto/StormByte-Crypto/lib/public/StormByte/crypto/keypair/generic.hxx