ts-algochat
    Preparing search index...

    Function encryptMessage

    • Encrypts a message for a recipient with forward secrecy

      Note: senderPublicKey is used for bidirectional decryption - it allows the sender to decrypt their own sent messages.

      Parameters

      • plaintext: string
      • senderPublicKey: Uint8Array
      • recipientPublicKey: Uint8Array

      Returns ChatEnvelope