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


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


certificate.verifySpkac(spkac[, encoding])

添加於:v0.11.8

參數
import { Buffer } from 'node:buffer';
const { Certificate } = await import('node:crypto');

const cert = Certificate();
const spkac = getSpkacSomehow();
console.log(cert.verifySpkac(Buffer.from(spkac)));
// Prints: true or falseconst { Certificate } = require('node:crypto');
const { Buffer } = require('node:buffer');

const cert = Certificate();
const spkac = getSpkacSomehow();
console.log(cert.verifySpkac(Buffer.from(spkac)));
// Prints: true or false

相關用法


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