Project: titanium
Issue TIMOB-23291: Windows: Random Values while trying to decrypt value using AES encryption on device
I am trying to implement encryption in my app for Windows Phone 8.1, it successfully encrypts the value but when I try to decrypt the same value it is generating random values every time. Below is the code I am using for encryption and decryption. {code:java} var CryptoJS = require('aes').CryptoJS; function encrypt(input) {	var encrypted = CryptoJS.AES.encrypt(input, "12345");	return encrypted; } function decrypt(input) {	var decrypted = CryptoJS.AES.decrypt(input, "12345").toString(CryptoJS.enc.Utf8);	return decrypted; } var devId = Ti.Platform.id; alert("DevID : "+devId); var encr = encrypt(devId); alert("encr : "+encr); alert("decr : "+decrypt(encr)); {code} P.S : When I run this app on emulator it is correctly decrypting the vales but when I try same app on device I am facing the above stated problem.
Story points: 8