encryption in javascript and how to decrypt in java
843811Apr 22 2008 — edited Apr 22 2008Hi all,
I have encrypted password entered by user in javascript using the code shown below and then how can i decrypt the password in java to move further.
function Encrypt(theText) {
alert("---");
output = new String;
Temp = new Array();
Temp2 = new Array();
TextSize = theText.length;
for (i = 0; i < TextSize; i++) {
rnd = Math.round(Math.random() * 122) + 68;
Temp[i] = theText.charCodeAt(i) + rnd;
Temp2[i] = rnd;
}
for (i = 0; i < TextSize; i++) {
output += String.fromCharCode(Temp, Temp2[i]);
}
return output;
}
thanks in advance.