ts-algochat
    Preparing search index...

    Function encryptPSKMessage

    • Encrypts a message using the PSK protocol.

      Parameters

      • plaintext: string

        Message text to encrypt

      • senderPublicKey: Uint8Array

        Sender's X25519 public key

      • recipientPublicKey: Uint8Array

        Recipient's X25519 public key

      • currentPSK: Uint8Array

        Current ratchet-derived PSK (32 bytes)

      • ratchetCounter: number

        Current ratchet counter value

      Returns PSKEnvelope

      PSKEnvelope containing encrypted message