Interface: KeyWrapCustodian
Defined in: packages/key-wrap/src/hsm.ts:39
The slice of KeyCustodian (@oktoid/key-custodian) the adapter calls. A
Pkcs11KeyCustodian satisfies it as it is.
Both methods answer null for an id that is not the custodian's, and throw a
KeyCustodianError (an Error named so, with a string code) for everything else.
Methods
unwrap()
unwrap(
handle,wrapped):Promise<Uint8Array<ArrayBufferLike> |null>
Defined in: packages/key-wrap/src/hsm.ts:43
Decrypts what KeyWrapCustodian.wrap returned, entirely or not at all.
Parameters
handle
string
wrapped
Uint8Array
Returns
Promise<Uint8Array<ArrayBufferLike> | null>
wrap()
wrap(
handle,dataKey):Promise<Uint8Array<ArrayBufferLike> |null>
Defined in: packages/key-wrap/src/hsm.ts:41
Encrypts dataKey on the token under the wrapping key handle names.
Parameters
handle
string
dataKey
Uint8Array
Returns
Promise<Uint8Array<ArrayBufferLike> | null>