Crypto Testing
    Preparing search index...

    Function mockSign

    • Produce a deterministic mock "signature" for the given message.

      The signature is the hex encoding of message XOR privateKey — not cryptographically meaningful but deterministic and fast.

      Parameters

      • privateKey: string

        Hex-encoded private key.

      • message: string | Uint8Array<ArrayBufferLike>

        UTF-8 string or bytes to sign.

      Returns string

      Hex-encoded mock signature.

      import { mockSign, TEST_KEYS } from "@sebastienrousseau/crypto-testing";

      const sig = mockSign(TEST_KEYS.ed25519.privateKey, "sign me");