bdisk/extra/bin/hashgen.php

8 lines
180 B
PHP
Raw Normal View History

<?php
$password = readline("Password: ");
$saltRaw = random_bytes(8);
$salt = base64_encode($saltRaw);
$result = crypt($password,'$6' . '$' . $salt .'$');
print $result . "\n";
?>