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()
分别获得 Cipher
和 Decipher
对象。
¥crypto.createCipher()
and crypto.createDecipher()
have been removed
as they use a weak key derivation function (MD5 with no salt) and static
initialization vectors.
It is recommended to derive a key using
crypto.pbkdf2()
or crypto.scrypt()
with random salts and to use
crypto.createCipheriv()
and crypto.createDecipheriv()
to obtain the
Cipher
and Decipher
objects respectively.