Crypto Testing
    Preparing search index...

    Function mockVerify

    • Verify a mock signature produced by mockSign.

      Re-signs the message with the private key and checks that the result matches the provided signature.

      Parameters

      • _publicKey: string

        Hex-encoded public key (unused; included for API parity).

      • message: string | Uint8Array<ArrayBufferLike>

        UTF-8 string or bytes that were signed.

      • signature: string

        Hex-encoded signature from mockSign.

      • privateKey: string

        Hex-encoded private key used to produce the signature.

      Returns boolean

      true if the signature matches, false otherwise.

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

      const sig = mockSign(TEST_KEYS.ed25519.privateKey, "msg");
      const ok = mockVerify(TEST_KEYS.ed25519.publicKey, "msg", sig, TEST_KEYS.ed25519.privateKey);