ts-algochat
    Preparing search index...

    Function decryptPSKMessage

    • Decrypts a PSK message envelope.

      Automatically detects if we are the sender or recipient and uses the appropriate decryption path.

      Parameters

      • envelope: PSKEnvelope

        PSK envelope to decrypt

      • recipientPrivateKey: Uint8Array

        Our X25519 private key

      • recipientPublicKey: Uint8Array

        Our X25519 public key

      • currentPSK: Uint8Array

        Current ratchet-derived PSK (32 bytes)

      Returns DecryptedContent | null

      Decrypted message content, or null for key-publish payloads