How to decipher string in node js which is encrypted in crypto js in javascript
My client side code: data.username = CryptoJS.AES.encrypt(user.username, "password"); data.password = CryptoJS.AES.encrypt(user.password, "password"); Then I am sending 'data' to server which is express.js var user = req.body; var decipher = crypto.createDecipher('aes256', "password"); var decrypted = decipher.update(user.username, 'hex', 'utf-8'); decrypted += decipher.final('utf-8'); I am getting this error: Error: DecipherInit error at new Decipher (crypto.js:368:17) at Object.Decipher (crypto.js:365:12) CryptoJS' encrypt function with a password uses the same EVP_BytesToKey function node