Advertisement
Yawin

Jarl

Mar 12th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. function jarl ($contra,$semilla)
  2.     {
  3.         $algo=$contra;
  4.         for($i=0;$i<strlen($semilla);$i++)
  5.         {
  6.             switch($semilla[$i])
  7.             {
  8.                 case 0:
  9.                     $algo=hash('md2',$algo);
  10.                     break;
  11.                 case 1:
  12.                     $algo=hash('md5',$algo);
  13.                     break;
  14.                 case 2:
  15.                     $algo=hash('sha256',$algo);
  16.                     break;
  17.                 case 3:
  18.                     $algo=hash('sha1',$algo);
  19.                     break;
  20.                 case 4:
  21.                     $algo=hash('crc32',$algo);
  22.                     break;
  23.                 case 5:
  24.                     $algo=hash('adler32',$algo);
  25.                     break;
  26.                 case 6:
  27.                     $algo=hash('sha512',$algo);
  28.                     break;
  29.                 case 7:
  30.                     $algo=hash('snefru',$algo);
  31.                     break;
  32.                 case 8:
  33.                     $algo=hash('sha384',$algo);
  34.                     break;
  35.                 case 9:
  36.                     $algo=hash('md4',$algo);
  37.                     break;
  38.                 default:
  39.                     $algo=hash('whirlpool',$algo);
  40.                     break;
  41.             }
  42.         }
  43.         return $algo;
  44.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement