Return a deterministic key pair for the given algorithm.
For ed25519, x25519, and p256 this returns the well-known test vectors from TEST_KEYS. For any other algorithm a synthetic pair of fixed hex strings is returned.
ed25519
x25519
p256
import { mockGenerateKeyPair } from "@sebastienrousseau/crypto-testing";const kp = mockGenerateKeyPair("ed25519");console.log(kp.publicKey, kp.privateKey); Copy
import { mockGenerateKeyPair } from "@sebastienrousseau/crypto-testing";const kp = mockGenerateKeyPair("ed25519");console.log(kp.publicKey, kp.privateKey);
Return a deterministic key pair for the given algorithm.
For
ed25519,x25519, andp256this returns the well-known test vectors from TEST_KEYS. For any other algorithm a synthetic pair of fixed hex strings is returned.