Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1468 → Rev 1467

/web/acc/manager/lib/crypt/crypt.php
3,10 → 3,6
{
$numargs=func_num_args();
$passwd=func_get_arg(0);
if ($numargs == 2){ //only to test or change password (keep the old algorythm and salt)
$salt=func_get_arg(1);
return crypt($passwd,$salt);
}
# set the salt and the algorithm
$shuf = substr(str_shuffle("abcdefghijklmnopqrstuvwxyz0123456789"),0,8);
# hash md5 > empreinte du mot de passe sur 22 caracteres
15,6 → 11,10
$salt='$5'.'$'.$shuf.'$';
# hash sha-512 > empreinte du mot de passe sur 86 caracteres
#$salt='$6'.'$'.$shuf.'$';
if ($numargs == 2){ //only to test and change password (keep the old algorythm and salt)
$salt=func_get_arg(1);
return crypt($passwd,$salt);
}
return crypt($passwd,$salt);
}
?>
/web/pass/crypt/crypt.php
3,10 → 3,6
{
$numargs=func_num_args();
$passwd=func_get_arg(0);
if ($numargs == 2){ //only to test or change password (keep the old algorythm and salt)
$salt=func_get_arg(1);
return crypt($passwd,$salt);
}
# set the salt and the algorithm
$shuf = substr(str_shuffle("abcdefghijklmnopqrstuvwxyz0123456789"),0,8);
# hash md5 > empreinte du mot de passe sur 22 caracteres
15,6 → 11,10
$salt='$5'.'$'.$shuf.'$';
# hash sha-512 > empreinte du mot de passe sur 86 caracteres
#$salt='$6'.'$'.$shuf.'$';
if ($numargs == 2){ //only to test and change password (keep the old algorythm and salt)
$salt=func_get_arg(1);
return crypt($passwd,$salt);
}
return crypt($passwd,$salt);
}
?>