Pwd-hash: Get the hash of a given password


Pwd-hash is a password hashing tool that use the crypt function to generate the hash of a string given on standard input. You can optain different hashing schemes for your password (DES, MD5, SHA).



$ ./pwd-hash --help
Usage: ./pwd-hash <option>
Display the password hash of a string given on stdin.

Options are:

  --des     Traditional DES-based scheme
  --md5     MD5-based scheme (this is the default)
  --grub        MD5-based scheme with a 6 bytes salt (as used in GRUB)
  --sha     SHA-based scheme (SHA-512), libc version >= 2.7

  --salt <string>   Specify a salt instead of random string
  -n, --noecho      Do not echo input characters
  -h, --help        Display this help
  -v, --version Display version

Some basic examples:

$ echo "P4ssw0rD" | pwd-hash --md5
$ pwd-hash --des <<<"P4ssw0rD"
$ pwd-hash --noecho --sha
$ pwd-hash --salt "abcdefgh" --md5