Today I was looking into a simple way to encrypt data without SSL, and as you've probably guessed, I came across JS MD5 encryption. However, I have this thing agaist using code that I don't understand, and this is one of those instances. So I figured taking the method it uses, I'd try my own little way, I invite you to figure out the original...

Scenario:

Say you're sniffing me (In a non-dog way ) and you get the information that at host.com I entered David.A and 16149119 as the user/password. So you go to host.com and find this JS code linked to the login.
Code:
function convert(x){
  var temp="";
  for(var i=0; i<x.length;i++){
    temp=temp+""+x.charCodeAt(i)*(x.charCodeAt(i)%8);
  }
  return temp;
}

function encrypt(pw, key){
return abs(parseInt(convert(pw))-parseInt(convert(key)));
}
PW is the password, and KEY is a random PHP generated key.
Can you crack it without using a table of some sort?

BTW, if I was really concered about hackers, I'd use JS MD5, I'm just not that concerned.