|
| enum Type | Type () const noexcept |
| | Algorithm of this keypair.
|
| const StormByte::Safe::String & | PublicKey () const noexcept |
| | Public key string.
|
| bool | HasPrivateKey () const noexcept |
| | Whether a private key is stored.
|
| const StormByte::Safe::Optional< Secure::Password > & | PrivateKey () const noexcept |
| | Private key, if any.
|
| | Generic (const Generic &other) |
| | Copy constructor.
|
| | Generic (Generic &&other) noexcept |
| | Move constructor.
|
| virtual | ~Generic () noexcept |
| | Destructor.
|
| Generic & | operator= (const Generic &other) |
| | Copy assignment.
|
| Generic & | operator= (Generic &&other) noexcept |
| | Move assignment.
|
File overloads write exactly the bytes the in-memory overloads return.
|
| StormByte::Safe::SecureBinary | SavePublic (StorageFormat format=StorageFormat::PEM) const noexcept |
| | Encode the public key in memory.
|
| StormByte::Safe::SecureBinary | SavePrivate (StorageFormat format=StorageFormat::PEM) const noexcept |
| | Encode the private key in memory, unencrypted.
|
| StormByte::Safe::SecureBinary | SavePrivate (const Secure::Password &encryptPassword, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Encode the private key in memory as encrypted PKCS#8 (prefer PEM).
|
| bool | Save (PathView directory, std::string_view baseName, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Write public and private files under a directory.
|
| template<typename Compatibility = void> |
| bool | Save (const std::filesystem::path &directory, std::string_view baseName, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Caller-side filesystem path adapter for unencrypted Save.
|
| bool | Save (PathView directory, std::string_view baseName, const Secure::Password &encryptPassword, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Write public and private files.
|
| template<typename Compatibility = void> |
| bool | Save (const std::filesystem::path &directory, std::string_view baseName, const Secure::Password &encryptPassword, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Caller-side filesystem path adapter for encrypted Save.
|
| bool | SavePublic (PathView filePath, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Write only the public key.
|
| template<typename Compatibility = void> |
| bool | SavePublic (const std::filesystem::path &filePath, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Caller-side filesystem path adapter for SavePublic.
|
| bool | SavePrivate (PathView filePath, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Write only the private key, unencrypted.
|
| template<typename Compatibility = void> |
| bool | SavePrivate (const std::filesystem::path &filePath, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Caller-side filesystem path adapter for unencrypted SavePrivate.
|
| bool | SavePrivate (PathView filePath, const Secure::Password &encryptPassword, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Write only the private key, encrypted (prefer PEM).
|
| template<typename Compatibility = void> |
| bool | SavePrivate (const std::filesystem::path &filePath, const Secure::Password &encryptPassword, StorageFormat format=StorageFormat::PEM) const noexcept |
| | Caller-side filesystem path adapter for encrypted SavePrivate.
|
| constexpr | Clonable ()=default |
| constexpr Clonable & | operator= (const Clonable &)=default |
| virtual constexpr | ~Clonable () noexcept=default |
| virtual PointerType | Clone () const =0 |
| virtual PointerType | Move ()=0 |
Abstract keypair.
Concrete algorithms derive from this.
Public key is a non-secret StormByte::Safe::String (typically Base64 SPKI DER). Private key, when present, is a StormByte::Crypto::Secure::Password holding PKCS#8 or native DER and is wiped with the last owner.
- Note
- Conditional DLL safety requires ABI-compatible modules and Crypto, Base and Buffer to remain loaded while values or ownership callbacks exist. Crypto binds private-material callbacks and defines value operations out of line. Derived providers must preserve these requirements and use boundary-safe fields, allocation, destruction and Clone/Move paths.