Page 1 of 1

Hi, when I moved to Dedicated server, decryption stop workin

Posted: Wed Oct 17, 2007 12:06 pm
by goodmorningsky
Hi, when I moved to Dedicated server, decryption stop working.



I'm using PHP. I think this is PHP configuration issue.

Does anyone have this problem?



Here is the method I'm using.


Code: Select all

function get_password_str($pass) {
 $nr = 1345345333;
 $add = 7;
 $nr2 = 0x12345671;
 
 $size = strlen($pass);
 for($i=0;$i<$size;$i++)
 {
  /* skipp space in password */
  if($pass[$i] == ' ' || $pass[$i] == '\t') continue;

  $tmp = ord($pass[$i]);
  $nr ^= ((($nr & 63)+$add)*$tmp) + ($nr << 8);
  $nr2 += ($nr2 << 8) ^ $nr;
  $add += $tmp;
 }
 $result1=$nr & ((1 << 31) -1); /* Don't use sign bit(str2int) */
 $result2=$nr2 & ((1 << 31) -1);
 $result = sprintf("%08x%08x",$result1,$result2);
 return $result;

}

Any comment will help.

Thank you.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:3. Do not make multiple, identical posts. This is viewed as spam and will be deleted.

Posted: Wed Oct 17, 2007 5:50 pm
by RobertGonzalez
What was the code doing before and what is it doing now?

Posted: Wed Oct 17, 2007 6:08 pm
by goodmorningsky
$pwdEncrypted = get_password_str("mypassword");

and compare it with the one from database.

Posted: Wed Oct 17, 2007 6:13 pm
by RobertGonzalez
Are the architectures different between the two (32 Bit vs 64 Bit)?

Posted: Sat Oct 20, 2007 12:35 pm
by John Cartwright
Topic Locked.