diff --git a/docs/HOWTO.hashgen b/docs/HOWTO.hashgen index 42b502e..e885b0e 100644 --- a/docs/HOWTO.hashgen +++ b/docs/HOWTO.hashgen @@ -20,9 +20,9 @@ There are many ways in which you can generate a salted hash. python -c "import crypt, getpass, pwd; print crypt.crypt('PASSWORD','\$6\$aBcDeFgHiJ\$')" -3.) php: +3.) php (extras/bin/hashgen.php) (UNTESTED): - php -r "\$password = readline('Password: '); \$saltRaw = random_bytes(8); \$salt = base64_encode(\$saltRaw); \$result = crypt(\$password,'\$6' . '\$' . \$salt .'\$'); print \$result . \"\n\";" + php -r "\$password = 'PASSWORD'; \$saltRaw = 'aBcDeFgHiJ'; \$salt = base64_encode(\$saltRaw); \$result = crypt(\$password,'\$6' . '\$' . \$salt .'\$'); print \$result . \"\n\";" 4.) even grub-crypt (if using legacy grub): diff --git a/extra/bin/hashgen.php b/extra/bin/hashgen.php new file mode 100644 index 0000000..1476ba9 --- /dev/null +++ b/extra/bin/hashgen.php @@ -0,0 +1,7 @@ +