decrypt
decrypt(
payload
,options
,instance
):Promise
<ArrayBuffer
>
Defined in: astrobase/src/encrypt/encrypt.ts:140
Decrypts the payload using the given options. Requires a key derivation input to be provided -
one of EncryptOptions.passphrase or EncryptOptions.pubKey. If pubkey
is provided,
then the Identity’s private key must be available in the Keyring.
The promise will error if no key derivation input is provided or if key derivation or decryption fails.
Parameters
Section titled “Parameters”payload
Section titled “payload”BufferSource
The payload to decrypt.
options
Section titled “options”The full options object.
instance
Section titled “instance”The instance of the active Keyring when using pubKey
.
Returns
Section titled “Returns”Promise
<ArrayBuffer
>
The decrypted payload as a promise.