method Certificate.exportPublicKey
Jump to headingCertificate.exportPublicKey(spkac: BinaryLike,encoding?: string,): Bufferconst { Certificate } = await import('node:crypto');
const spkac = getSpkacSomehow();
const publicKey = Certificate.exportPublicKey(spkac);
console.log(publicKey);
// Prints: the public key as <Buffer ...>
Parameters Jump to heading
Jump to headingspkac: BinaryLikeoptional
Jump to headingencoding: stringThe encoding of the spkac string.
Return Type Jump to heading
BufferThe public key component of the spkac data structure, which includes a public key and a challenge.