Skip to content

decryptAsymmetric

decryptAsymmetric(data, publicKeyB, secretKeyA): Uint8Array | false

Wrapper around nacl.box.open. Authenticated decryption of an encrypted message.

Parameters

data: EncryptedAsymmetric | EncryptedAsymmetricString

Object containing encrypted message and nonce used for encryption.

publicKeyB: any

Public key of the sender. Necessary to authenticate the message during decryption.

secretKeyA: any

Private key of the recipient. Required for decryption.

Returns

Uint8Array | false

Decrypted message or false if decryption is unsuccessful.

Source

utils/src/Crypto.ts:250