![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Test stub implementing IKmsClient using software AES Key Wrap. More...
#include <hsm_client_stub.hpp>
Public Member Functions | |
| HsmClientStub ()=default | |
| expected< void > | register_kek (const std::string &key_id, const std::vector< uint8_t > &kek) |
| Register a KEK by ID. The key must be exactly 32 bytes (AES-256). | |
| void | register_kek (const std::string &key_id, const std::array< uint8_t, 32 > &kek) |
| Register a KEK from a raw 32-byte array. | |
| bool | has_kek (const std::string &key_id) const |
| Check if a KEK is registered. | |
| size_t | kek_count () const |
| Number of registered KEKs. | |
| expected< std::vector< uint8_t > > | wrap_key (const std::vector< uint8_t > &dek, const std::string &master_key_id) const override |
Wrap (encrypt) a DEK under the KEK identified by master_key_id. | |
| expected< std::vector< uint8_t > > | unwrap_key (const std::vector< uint8_t > &wrapped_dek, const std::string &master_key_id) const override |
Unwrap (decrypt) a wrapped DEK using the KEK identified by master_key_id. | |
Public Member Functions inherited from signet::forge::crypto::IKmsClient | |
| virtual | ~IKmsClient ()=default |
Test stub implementing IKmsClient using software AES Key Wrap.
Simulates an HSM-backed KMS for integration testing. Keys are stored in process memory — NOT for production use.
Usage:
Definition at line 190 of file hsm_client_stub.hpp.
|
default |
|
inline |
Check if a KEK is registered.
Definition at line 216 of file hsm_client_stub.hpp.
|
inline |
Number of registered KEKs.
Definition at line 221 of file hsm_client_stub.hpp.
|
inline |
Register a KEK from a raw 32-byte array.
Definition at line 210 of file hsm_client_stub.hpp.
|
inline |
Register a KEK by ID. The key must be exactly 32 bytes (AES-256).
Definition at line 195 of file hsm_client_stub.hpp.
|
inlineoverridevirtual |
Unwrap (decrypt) a wrapped DEK using the KEK identified by master_key_id.
| wrapped_dek | Wrapped DEK bytes (as returned by wrap_key). |
| master_key_id | KMS identifier for the Key Encryption Key (KEK). |
Implements signet::forge::crypto::IKmsClient.
Definition at line 245 of file hsm_client_stub.hpp.
|
inlineoverridevirtual |
Wrap (encrypt) a DEK under the KEK identified by master_key_id.
| dek | Raw Data Encryption Key bytes (typically 32 bytes for AES-256). |
| master_key_id | KMS identifier for the Key Encryption Key (KEK). |
Implements signet::forge::crypto::IKmsClient.
Definition at line 225 of file hsm_client_stub.hpp.