当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Node.js certificate.exportChallenge(spkac[, encoding])用法及代码示例


certificate.exportChallenge(spkac[, encoding])

添加于:v0.11.8

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

相关用法


注:本文由纯净天空筛选整理自nodejs.org大神的英文原创作品 certificate.exportChallenge(spkac[, encoding])。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。