crypto.getHashes()
-
返回:<string[]> 支持的哈希算法名称的数组,例如
'RSA-SHA256'
。哈希算法也称为 "digest" 算法。¥Returns: <string[]> An array of the names of the supported hash algorithms, such as
'RSA-SHA256'
. Hash algorithms are also called "digest" algorithms.
const {
getHashes,
} = await import('node:crypto');
console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
const {
getHashes,
} = require('node:crypto');
console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]