encryptAsymmetric
encryptAsymmetric(
message
,publicKeyA
,secretKeyB
):EncryptedAsymmetric
Wrapper around nacl.box. Authenticated encryption of a message for a recipient’s public key.
Parameters
• message: any
String or byte array to be encrypted.
• publicKeyA: any
Public key of the recipient. The owner will be able to decrypt the message.
• secretKeyB: any
Private key of the sender. Necessary to authenticate the message during decryption.
Returns
EncryptedAsymmetric
Encrypted message and nonce used for encryption.