brix / crypto-js

JavaScript library of crypto standards.
Other
15.88k stars 2.39k forks source link

How to replace crypto deprecated #442

Open arjunsubedi-varosa opened 1 year ago

arjunsubedi-varosa commented 1 year ago

What is the replacement for cypto in nodejs

akaramanapp commented 1 year ago

Using crypto.createCipher() and crypto.createDecipher() should be avoided 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() and to use crypto.createCipheriv() and crypto.createDecipheriv() to obtain the Cipher and Decipher objects respectively.