當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


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


certificate.exportPublicKey(spkac[, encoding])

添加於:v0.11.8

參數
const { Certificate } = await import('node:crypto');
const cert = Certificate();
const spkac = getSpkacSomehow();
const publicKey = cert.exportPublicKey(spkac);
console.log(publicKey);
// Prints: the public key as <Buffer ...>const { Certificate } = require('node:crypto');
const cert = Certificate();
const spkac = getSpkacSomehow();
const publicKey = cert.exportPublicKey(spkac);
console.log(publicKey);
// Prints: the public key as <Buffer ...>

相關用法


注:本文由純淨天空篩選整理自nodejs.org大神的英文原創作品 certificate.exportPublicKey(spkac[, encoding])。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。