jseeqret - v1.0.4
    Preparing search index...

    Function asymmetric_encrypt

    • Encrypt a string using NaCl Box (X25519 + XSalsa20-Poly1305). Compatible with PyNaCl's Box(sender_private, recipient_public).encrypt(msg).

      Parameters

      • plaintext: string

        UTF-8 string to encrypt

      • sender_private_key: Uint8Array<ArrayBufferLike>

        sender's private key

      • recipient_public_key: Uint8Array<ArrayBufferLike>

        recipient's public key

      Returns string

      base64-encoded encrypted message (nonce + ciphertext)