Rulvar API reference / @rulvar/core / DataKeyProvider
Interface: DataKeyProvider
Defined in: packages/core/src/l0/encryption.ts:69
The KMS seam. keyId is a stable routing id stamped into every envelope (a KMS key ARN or alias, or a local rotation label); the two methods are the exact shape of KMS GenerateDataKey and Decrypt. Both are called only inside createEnvelopeEncryption.
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
keyId | readonly | string | packages/core/src/l0/encryption.ts:70 |
Methods
generateDataKey()
ts
generateDataKey(): Promise<{
plaintext: Bytes;
wrapped: Bytes;
}>;Defined in: packages/core/src/l0/encryption.ts:71
Returns
Promise<{ plaintext: Bytes; wrapped: Bytes; }>
unwrapDataKey()
ts
unwrapDataKey(wrapped): Promise<Bytes>;Defined in: packages/core/src/l0/encryption.ts:72
Parameters
| Parameter | Type |
|---|---|
wrapped | Bytes |
Returns
Promise<Bytes>