Certificate.verifySpkac(spkac[, encoding])
spkac
<string> | <ArrayBuffer> | <Buffer> | <TypedArray> | <DataView>encoding
<string>spkac
字符串的编码。- 返回: <boolean> 如果给定的
spkac
数据结构有效,则为true
,否则为false
。
import { Buffer } from 'node:buffer';
const { Certificate } = await import('node:crypto');
const spkac = getSpkacSomehow();
console.log(Certificate.verifySpkac(Buffer.from(spkac)));
// 打印: true 或 false
const { Certificate } = require('node:crypto');
const { Buffer } = require('node:buffer');
const spkac = getSpkacSomehow();
console.log(Certificate.verifySpkac(Buffer.from(spkac)));
// 打印: true 或 false
spkac
<string> | <ArrayBuffer> | <Buffer> | <TypedArray> | <DataView>encoding
<string> The encoding of thespkac
string.- Returns: <boolean>
true
if the givenspkac
data structure is valid,false
otherwise.
import { Buffer } from 'node:buffer';
const { Certificate } = await import('node:crypto');
const spkac = getSpkacSomehow();
console.log(Certificate.verifySpkac(Buffer.from(spkac)));
// Prints: true or false
const { Certificate } = require('node:crypto');
const { Buffer } = require('node:buffer');
const spkac = getSpkacSomehow();
console.log(Certificate.verifySpkac(Buffer.from(spkac)));
// Prints: true or false