In Linux I can create a SHA1 password hash using sha1pass mypassword
. Is there a similar command line tool which lets me create sha512
hashes? Same question for Bcrypt
and PBKDF2
.
security password encryption – How to Create SHA512 Password Hashes on Command Line
encryptionhashsumpasswordSecurity
Best Answer
Yes, you're looking for
mkpasswd
, which (at least on Debian) is part of thewhois
package. Don't ask why...Unfortunately, my version at least doesn't do bcrypt. If your C library does, it should (and the manpage gives a -R option to set the strength). -R also works on sha-512, but I'm not sure if its PBKDF-2 or not.
If you need to generate bcrypt passwords, you can do it fairly simply with the
Crypt::Eksblowfish::Bcrypt
Perl module.