DEP0106: crypto.createCipher 和 crypto.createDecipher


🌐 DEP0106: crypto.createCipher and crypto.createDecipher

类型:寿命终止

🌐 Type: End-of-Life

crypto.createCipher()crypto.createDecipher() 已被移除,因为它们使用了弱密钥派生函数(无盐的 MD5)和静态初始化向量。建议使用 crypto.pbkdf2()crypto.scrypt() 并结合随机盐来派生密钥,并使用 crypto.createCipheriv()crypto.createDecipheriv() 分别获取 CipherivDecipheriv 对象。