Crypto Lib
    Preparing search index...

    Function x25519Exchange

    • Perform X25519 Diffie-Hellman key exchange.

      Parameters

      • privateKey: string | Uint8Array<ArrayBufferLike>

        Our private key (hex or bytes).

      • theirPublicKey: string | Uint8Array<ArrayBufferLike>

        The other party's public key (hex or bytes).

      Returns KeyExchangeResult

      Shared secret (should be passed through HKDF before use).