http auth api feature

This commit is contained in:
Serghey Rodin 2015-07-13 22:58:27 +03:00
commit 99e73ded9c
6 changed files with 282 additions and 2 deletions

View file

@ -32,5 +32,10 @@ if ($crypt == 'sha-512' ) {
$hash = str_replace('$rounds=5000','',$hash);
}
// Generating base64 hash
if ($crypt == 'htpasswd' ) {
$hash = crypt($password, base64_encode($password));
}
// Printing result
echo $hash . "\n";