Closed GoogleCodeExporter closed 8 years ago
Why does CryptoJS.AES.decrypt(a, key, { 'iv': iv }); not work?
Original comment by Jeff.Mott.OR
on 12 Oct 2012 at 2:08
[deleted comment]
[deleted comment]
In this example when i call decrypt like this.
var decrypt = CryptoJS.AES.decrypt(a, key, { 'iv': iv });
var ddd = decrypt.toString();
I get this returned "31323334353637383930" how do i convert this back to
"1234567890".
Original comment by mikkelse...@gmail.com
on 12 Oct 2012 at 3:17
CryptoJS doesn't know what kind of data you have, so its default is to output
hex. You can tell it instead to use UTF-8.
decrypt.toString( CryptoJS.enc.Utf8 );
Original comment by Jeff.Mott.OR
on 12 Oct 2012 at 4:58
Thank you very much, that worked like a charm.
Original comment by mikkelse...@gmail.com
on 13 Oct 2012 at 1:39
Original comment by Jeff.Mott.OR
on 13 Oct 2012 at 5:42
Original issue reported on code.google.com by
mikkelse...@gmail.com
on 12 Oct 2012 at 12:18