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

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Locked
goodmorningsky
Forum Newbie
Posts: 11
Joined: Thu Aug 11, 2005 12:40 am

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

Post 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.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

What was the code doing before and what is it doing now?
goodmorningsky
Forum Newbie
Posts: 11
Joined: Thu Aug 11, 2005 12:40 am

Post by goodmorningsky »

$pwdEncrypted = get_password_str("mypassword");

and compare it with the one from database.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Are the architectures different between the two (32 Bit vs 64 Bit)?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Topic Locked.
Locked