live · mainnetoc · docs
specs · api · guides
docs / documentation

@orangecheck/vault-core


@orangecheck/vault-core / unwrapVaultKey

Function: unwrapVaultKey()

function unwrapVaultKey(w: WrappedKey, passphrase: string): Uint8Array;

Defined in: vault-core/src/crypto.ts:111

Unwrap the vault key from its escrowed WrappedKey using the passphrase. scrypt-derives the wrap key, then AES-256-GCM-decrypts. Throws WrongPassphrase on any failure — never returns a bogus key.

Parameters

ParameterType
wWrappedKey
passphrasestring

Returns

Uint8Array