crypto.createVerify(algorithm[, options])
算法<string>选项<Object>stream.Writable选项- 返回: <Verify>
创建并返回一个使用给定算法的 Verify 对象。使用 crypto.getHashes() 获取可用签名算法名称的数组。可选的 options 参数控制 stream.Writable 的行为。
【Creates and returns a Verify object that uses the given algorithm.
Use crypto.getHashes() to obtain an array of names of the available
signing algorithms. Optional options argument controls the
stream.Writable behavior.】
在某些情况下,可以使用签名算法的名称创建一个 Verify 实例,例如 'RSA-SHA256',而不是使用摘要算法。这将使用相应的摘要算法。但这并不适用于所有签名算法,例如 'ecdsa-with-SHA256',因此最好始终使用摘要算法的名称。
【In some cases, a Verify instance can be created using the name of a signature
algorithm, such as 'RSA-SHA256', instead of a digest algorithm. This will use
the corresponding digest algorithm. This does not work for all signature
algorithms, such as 'ecdsa-with-SHA256', so it is best to always use digest
algorithm names.】