Está en la página 1de 1

<?php function md5crypt($password){ // create a salt that ensures crypt creates an md5 hash $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZ' .

'abcdefghijklmnopqrstuvwxyz0123456789+/'; $salt='$1$'; for($i=0; $i<9; $i++){ $salt.=$base64_alphabet[rand(0,63)]; } // return the crypt md5 password return crypt($password,$salt.'$'); } ?>

También podría gustarte