CodeDotJS / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

decrypt of ciphertext not working for strings #146

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. See  http://jsfiddle.net/setj6r2y/

What is the expected output? What do you see instead?
Fails on 2nd decoding.

What version of the product are you using? On what operating system?
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js

Please provide any additional information below.
http://jsfiddle.net/setj6r2y/

Original issue reported on code.google.com by randynwa...@gmail.com on 6 Jan 2015 at 7:00

GoogleCodeExporter commented 9 years ago
Never mind.  Found problem.  Need to parse the string version first.

ciphertext = CryptoJS.enc.Hex.parse(String(encrypted.ciphertext))

Original comment by randynwa...@gmail.com on 6 Jan 2015 at 7:12

GoogleCodeExporter commented 9 years ago
encrypted.ciphertext is never be as a object like string or whatever object. so 
no use of passing object to decrepit... please use 
CryptoJS.enc.Hex.parse(encrypted.ciphertext)

Original comment by g.selvag...@gmail.com on 13 May 2015 at 11:51