Skip to main content
Certificate.exportChallenge - crypto - Node documentation
method Certificate.exportChallenge

Usage in Deno

import { Certificate } from "node:crypto";
Certificate.exportChallenge(spkac: BinaryLike): Buffer
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

Parameters

spkac: BinaryLike

Return Type

Buffer

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

Back to top