The author of this xxtea code has wrapped all his JS in a way that I am not familiar with.
Their xxtea code ends in this.
global.XXTEA = {
utf8Encode: utf8Encode,
utf8Decode: utf8Decode,
encrypt: encrypt,
encryptToBase64: encryptToBase64,
decrypt: decrypt,
decryptFromBase64: decryptFromBase64
};
})(this || [eval][0]('this'));
I am trying to call their decrypt function like this:
function dec(s)
{
var I=GI(s);
if(I)
{
alert(I.value);
//var strDec =XXTEA.decrypt(I.value,document.getElementById("token").value);
//alert(strDec);
// I.value = strDec;
alert(document.getElementById("token").value);
}
}
If I uncomment those lines of code then the script crashes - I only see the first alert(...)
So if XXTEA.decrypt(...) is not the correct way to call their infernal function then how the frig DO you call it???
I don't understand!
temp.h (19.9 KB)