certificate.exportChallenge(spkac)
spkac
<string> | <Buffer> | <TypedArray> | <DataView>- 返回: <Buffer>
spkac
数据结构的挑战组件,包括公钥和挑战。
const cert = require('crypto').Certificate();
const spkac = getSpkacSomehow();
const challenge = cert.exportChallenge(spkac);
console.log(challenge.toString('utf8'));
// 打印: the challenge as a UTF8 string
spkac
<string> | <Buffer> | <TypedArray> | <DataView>- Returns: <Buffer> The challenge component of the
spkac
data structure, which includes a public key and a challenge.
const cert = require('crypto').Certificate();
const spkac = getSpkacSomehow();
const challenge = cert.exportChallenge(spkac);
console.log(challenge.toString('utf8'));
// Prints: the challenge as a UTF8 string