Jump to content

Encrypt problem


amaru

Recommended Posts

I use this function to encrypt passwords. I can't use md5 because i use the passwords in a sa-mp server.

function cryptpw($password)
   {
      for($i=0; $i < strlen($password); $i++)
      {
         $temp = ord($password[$i]);
         $temp += (3^$i) * ($i % 15);
         if($temp > (0xff))
         {
            $temp -= 256;
         }
         $password[$i] = chr($temp);
      }  
      return $password;
   }

It encrypts the password but it puts some signs at the end of it like '}' or '�'. How can i remove them?

Link to comment
https://forums.phpfreaks.com/topic/241125-encrypt-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.