DEP0203:将 CryptoKey 传递给 node:crypto API


🌐 DEP0203: Passing CryptoKey to node:crypto APIs

类型:仅文档

🌐 Type: Documentation-only

CryptoKey 传递给 node:crypto 函数已弃用,并且在未来的版本中将抛出错误。这包括 crypto.createPublicKey()crypto.createPrivateKey()crypto.sign()crypto.verify()crypto.publicEncrypt()crypto.publicDecrypt()crypto.privateEncrypt()crypto.privateDecrypt()Sign.prototype.sign()Verify.prototype.verify()crypto.createHmac()crypto.createCipheriv()crypto.createDecipheriv()crypto.encapsulate()crypto.decapsulate()

🌐 Passing a CryptoKey to node:crypto functions is deprecated and will throw an error in a future version. This includes crypto.createPublicKey(), crypto.createPrivateKey(), crypto.sign(), crypto.verify(), crypto.publicEncrypt(), crypto.publicDecrypt(), crypto.privateEncrypt(), crypto.privateDecrypt(), Sign.prototype.sign(), Verify.prototype.verify(), crypto.createHmac(), crypto.createCipheriv(), crypto.createDecipheriv(), crypto.encapsulate(), and crypto.decapsulate().