Функция шифровки пароля в md5 с солью


$salt="123!#&%asgfHTA"; 
$pass="proba"; 
function my_crypt($pass,$salt) 
{ 
 $spec=array('~','!','@','#','$','%','^','&','*','?'); 
 $crypted=md5(md5( $salt).md5($pass)); 
 $c_text=md5($pass); 
 for ($i=0;$i<strlen($crypted);$i++) 
 { 
 if (ord($c_text[$i])>=48 and ord($c_text[$i])<=57){ 
  @$temp.=$spec[$c_text[$i]]; 
 } elseif(ord($c_text[$i])>=97 and ord($c_text[$i])<=100){ 
  @$temp.=strtoupper($crypted[$i]); 
 } else { 
  @$temp.=$crypted[$i]; 
 } 
 } 
 return md5($temp); 
}