To create a password you can use password generators or you can create a php file edited and upload this to your server.
The file should contatin:-
// Password to be encrypted
$clearTextPassword = ‘passwordplease’;
// Encrypt password
$password = crypt($clearTextPassword, base64_encode($clearTextPassword));
// Print encrypted password
If you save this file as generatepassword.php you upload and then go to:-
This will show the password you selected.
If you are look for MD5 hash password generation then click here.
If you are looking for .htaccess password protection click here.