Fastest way to generate passwords for htpasswd

The fastest way of generating passwords for htpasswd program is… to use PHP for this task:

[code language=”php”]
$clearTextPassword = ‘some password’;
$password = crypt($clearTextPassword, base64_encode($clearTextPassword));

echo $password;
[/code]

You may also (of course!) use htpasswd program or some 3rd party tools.

Leave a Reply