method Certificate.exportPublicKey
Jump to headingCertificate.exportPublicKey(spkac: BinaryLike,encoding?: string,): Buffer
const { 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: BinaryLike
optional
Jump to headingencoding: string
The encoding
of the spkac
string.
Return Type Jump to heading
Buffer
The public key component of the spkac
data structure, which includes a public key and a challenge.