exportChallenge

const { Certificate } = await import('node:crypto');
const spkac = getSpkacSomehow();
const challenge = Certificate.exportChallenge(spkac);
console.log(challenge.toString('utf8'));
// Prints: the challenge as a UTF8 string

Since

v9.0.0

Return

The challenge component of the spkac data structure, which includes a public key and a challenge.

Parameters

encoding

The encoding of the spkac string.