List all keys, optionally filtered by usage or enabled state.
Optionalfilters: { usage?: string; enabled?: boolean }Retrieve metadata for a specific key by ID.
Create a new key with the given algorithm and usage.
Optional_metadata: Record<string, string>Enable a previously disabled key.
Disable a key so it cannot be used for operations.
Schedule a key for deletion after a pending window.
Encrypt plaintext with AES-256-GCM under the current key version.
Optionalcontext: Record<string, string>Decrypt AES-256-GCM ciphertext with the key version it names.
Optionalcontext: Record<string, string>Sign data using the current Ed25519 key version.
Optional_algorithm: stringVerify an Ed25519 signature against every key version that has not
been destroyed. Malformed signatures verify as false.
Optional_algorithm: stringRotate the key: add a new current version while keeping earlier versions for decryption and verification.
Destroy the material of a non-current key version. Ciphertext and
signatures produced under it can no longer be used. Rejects with
INVALID_ARGUMENT for the current version and NOT_FOUND for an
unknown key or version.
Wrap an existing key with the managed key.
Optionalcontext: Record<string, string>Unwrap a wrapped key with the managed key.
Optionalcontext: Record<string, string>
Local in-memory KMS provider.
Uses Node.js crypto for AES-256-GCM symmetric operations and
@sebastienrousseau/crypto-libEd25519 for signing operations. Keys are stored in memory and do not persist across restarts.Rotation adds a key version rather than replacing the material: ciphertext names the version that produced it, so data encrypted before a rotation still decrypts, and signatures made before a rotation still verify, until that version is destroyed with LocalKmsProvider.destroyKeyVersion. Failures reject with a KmsError.
Example