Crypto Lib
    Preparing search index...

    Function hpkeGenerateKeyPair

    • Generate an HPKE key pair for the specified KEM.

      Parameters

      • kem: HpkeKem = "x25519"

        KEM algorithm to use (default: "x25519").

      Returns HpkeKeyPair

      Hex-encoded key pair.

      const kp = hpkeGenerateKeyPair("x25519");
      console.log(kp.publicKey); // 64-char hex (32 bytes)
      console.log(kp.privateKey); // 64-char hex (32 bytes)