<?php
/*
This script is copyright Dustin A.K.A. Skare(tm) 2011
*/
$len = 64;
$base='ABCDEFGHKLMNOPQRSTWXYZabcdefghjkmnpqrstwxyz123456789';
$max=strlen($base)-1;
$ranstr='';
mt_srand((double)microtime()*1000000);
while (strlen($ranstr)<$len+1)
$ranstr.=$base{mt_rand(0,$max)};
$len = 32;
$base='ABCDEFGHKLMNOPQRSTWXYZabcdefghjkmnpqrstwxyz123456789';
$max=strlen($base)-1;
$ranstr2='';
mt_srand((double)microtime()*1000000);
while (strlen($ranstr2)<$len+1)
$ranstr2.=$base{mt_rand(0,$max)};
$salt = hash('whirlpool', $ranstr2);
$hashed = hash('adler32', hash('whirlpool', hash('ripemd256', sha1(base64_encode(crypt(md5(hash('sha512', $ranstr))))))));
$suphash = base64_encode($hashed . $salt);
echo $suphash;
?>