• Wrapper around nacl.box. Authenticated encryption of a message for a recipient's public key.

    Parameters

    • message: CryptoInput

      String or byte array to be encrypted.

    • publicKeyA: CryptoInput

      Public key of the recipient. The owner will be able to decrypt the message.

    • secretKeyB: CryptoInput

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

    Returns EncryptedAsymmetric

    Encrypted message and nonce used for encryption.