certificate.verifySpkac(spkac[, encoding])
-
spkac
<string> | <ArrayBuffer> | <Buffer> | <TypedArray> | <DataView> -
返回:<boolean> 如果给定的
spkac
数据结构有效,则为true
,否则为false
。¥Returns: <boolean>
true
if the givenspkac
data structure is valid,false
otherwise.
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 false
const { Buffer } = require('node:buffer');
const { Certificate } = require('node:crypto');
const cert = Certificate();
const spkac = getSpkacSomehow();
console.log(cert.verifySpkac(Buffer.from(spkac)));
// Prints: true or false