ReadonlynameProvider identifier.
ReadonlyhsmHSM model label (diagnostic only; no device is contacted).
ReadonlyslotConfigured slot index.
ReadonlytokenConfigured token label.
Retrieve simulated session diagnostics.
List all simulated keys matching optional filters.
Optionalfilters: { usage?: string; enabled?: boolean }Retrieve metadata for a specific simulated key.
Create a key held in process memory (not hardware-isolated).
Optional_metadata: Record<string, string>Enable an HSM key.
Disable an HSM key.
Schedule deletion of a simulated key.
Encrypt plaintext with AES-256-GCM in software (current key version).
Optionalcontext: Record<string, string>Decrypt ciphertext with AES-256-GCM using the key version it names.
Optionalcontext: Record<string, string>Sign data with Ed25519 in software (current key version).
Verify a signature against every simulated key version that has not
been destroyed. Malformed signatures verify as false.
Optional_algorithm: stringRotate a simulated key: add a new current version and a new simulated handle, keeping earlier versions for decryption and verification.
Destroy the material of a non-current key version. Rejects with
INVALID_ARGUMENT for the current version and NOT_FOUND for an
unknown key or version.
Simulated PKCS#11 KMS provider.
An in-memory software simulation of a PKCS#11-style provider for tests and CI. It has no hardware backing, no key isolation and no FIPS 140 validation. Construction requires
simulate: trueand throws otherwise.Example