Using crypto.stanford.edu/sjcl/sjcl.js, I encrypt some plain text with a password.
The encrypted data, when shown by its toString method (I suppose), is externalized as a string like
{"iv":"H6V2RJhNp0 ….. ,"ct":"MLCr2tg01DNDeEN97mEpYRg0S3X0SjH7rZ5KlUmuw1M"}
Later, I want to initialize a javascript variable with that externalized string:
var unclear = eval("({"iv":"H6V2RJhNp0 ….. ,"ct":"MLCr2tg01DNDeEN97mEpYRg0S3X0SjH7rZ5KlUmuw1M"})");
When I try to decrypt that variable (with the same password of course), I get the error
sjcl.js:40 TypeError: 'undefined' is not a function (evaluating 'a.replace(/\s/g,"")')
Any help who be appreciated.
Jim