Keypairs of the Crypto module. More...
Classes | |
| class | DSA |
| DSA keypair. More... | |
| class | ECC |
| ECC keypair. More... | |
| class | ECDH |
| ECDH keypair. More... | |
| class | ECDSA |
| ECDSA keypair. More... | |
| class | ED25519 |
| Ed25519 keypair. More... | |
| class | Exception |
| Exception from the key-pair component. More... | |
| class | Generic |
| Abstract keypair. More... | |
| class | RSA |
| RSA keypair. More... | |
| class | X25519 |
| X25519 keypair. More... | |
Typedefs | |
| using | PathView = std::basic_string_view<std::filesystem::path::value_type> |
| Borrowed native path characters for allocation-free DLL arguments. | |
Enumerations | |
| enum class | Type { DSA , ECC , ECDH , ECDSA , ED25519 , RSA , X25519 } |
| Available keypair algorithms. More... | |
| enum class | StorageFormat { PEM , DER } |
| On-disk encoding. More... | |
Functions | |
| Generic::PointerType | Create (Type type, unsigned short bits) noexcept |
| Generate a keypair. | |
| Generic::PointerType | Load (const StormByte::Safe::SecureBinary &data) noexcept |
| Load from one in-memory key (public, private, or concatenated PEM). | |
| Generic::PointerType | Load (const StormByte::Safe::SecureBinary &data, const Secure::Password &password) noexcept |
| Load from one in-memory key; decrypt if needed. | |
| Generic::PointerType | Load (const StormByte::Safe::SecureBinary &publicKey, const StormByte::Safe::SecureBinary &privateKey) noexcept |
| Load from separate in-memory public and private keys. | |
| Generic::PointerType | Load (const StormByte::Safe::SecureBinary &publicKey, const StormByte::Safe::SecureBinary &privateKey, const Secure::Password &password) noexcept |
| Load from separate in-memory keys; decrypt the private key if needed. | |
| Generic::PointerType | Load (PathView publicKeyPath, PathView privateKeyPath) noexcept |
| Load from separate public and private files. | |
| template<typename Compatibility = void> | |
| Generic::PointerType | Load (const std::filesystem::path &publicKeyPath, const std::filesystem::path &privateKeyPath) noexcept |
| Caller-side filesystem path adapter for loading separate files. | |
| Generic::PointerType | Load (PathView publicKeyPath, PathView privateKeyPath, const Secure::Password &password) noexcept |
| Load from separate files; decrypt the private key if needed. | |
| template<typename Compatibility = void> | |
| Generic::PointerType | Load (const std::filesystem::path &publicKeyPath, const std::filesystem::path &privateKeyPath, const Secure::Password &password) noexcept |
| Caller-side filesystem path adapter for loading separate encrypted files. | |
| Generic::PointerType | Load (PathView path) noexcept |
| Load from one file (public, private, or concatenated PEM). | |
| template<typename Compatibility = void> | |
| Generic::PointerType | Load (const std::filesystem::path &path) noexcept |
| Caller-side filesystem path adapter for loading one file. | |
| Generic::PointerType | Load (PathView path, const Secure::Password &password) noexcept |
| Load from one file; decrypt if needed. | |
| template<typename Compatibility = void> | |
| Generic::PointerType | Load (const std::filesystem::path &path, const Secure::Password &password) noexcept |
| Caller-side filesystem path adapter for loading one encrypted file. | |
| using StormByte::Crypto::KeyPair::PathView = std::basic_string_view<std::filesystem::path::value_type> |
Borrowed native path characters for allocation-free DLL arguments.
|
strong |
|
strong |
|
noexcept |
Generate a keypair.
| type | Algorithm. |
| bits | Key size in bits. |
|
inlinenoexcept |
Caller-side filesystem path adapter for loading one file.
| Compatibility | Defaulted to prefer the view overload for native strings. |
| path | Key file. |
|
inlinenoexcept |
Caller-side filesystem path adapter for loading one encrypted file.
| Compatibility | Defaulted to prefer the view overload for native strings. |
| path | Key file. |
| password | Password for encrypted private material. |
|
inlinenoexcept |
Caller-side filesystem path adapter for loading separate files.
| Compatibility | Defaulted to prefer the view overload for native strings. |
| publicKeyPath | Public file, or empty. |
| privateKeyPath | Private file, or empty. |
|
inlinenoexcept |
Caller-side filesystem path adapter for loading separate encrypted files.
| Compatibility | Defaulted to prefer the view overload for native strings. |
| publicKeyPath | Public file, or empty. |
| privateKeyPath | Private file. |
| password | Password for an encrypted private key. |
|
noexcept |
Load from one in-memory key (public, private, or concatenated PEM).
Format is auto-detected.
| data | PEM or DER bytes, for example from a file or #embed. |
|
noexcept |
Load from one in-memory key; decrypt if needed.
| data | PEM or DER bytes. |
| password | Password for encrypted private material. |
|
noexcept |
Load from separate in-memory public and private keys.
Format is auto-detected.
| publicKey | Public key bytes, or empty. |
| privateKey | Private key bytes, or empty. |
|
noexcept |
Load from separate in-memory keys; decrypt the private key if needed.
| publicKey | Public key bytes, or empty. |
| privateKey | Private key bytes. Raw DER is taken as encrypted PKCS#8. |
| password | Password for an encrypted private key. |
|
noexcept |
Load from one file (public, private, or concatenated PEM).
| path | Key file. |
|
noexcept |
Load from one file; decrypt if needed.
| path | Key file. |
| password | Password for encrypted private material. |
|
noexcept |
Load from separate public and private files.
Format is auto-detected.
| publicKeyPath | Public file, or empty. |
| privateKeyPath | Private file, or empty. No default: a single path is Load(PathView). |
|
noexcept |
Load from separate files; decrypt the private key if needed.
| publicKeyPath | Public file, or empty. |
| privateKeyPath | Private file. |
| password | Password for an encrypted private key. |