.\" This file is in the PUBLIC DOMAIN. .TH CRYPT 1 "2005-08-31" .SH NAME crypt \- create password hashes .SH SYNOPSIS crypt password [salt] .SH DESCRIPTION .B crypt creates a hash from the supplied .I password and writes the hash to standard output, followed by a newline. The hash is generated by calling .B crypt(3) with the supplied .I password and .I salt as arguments. If no .I salt is supplied, .B crypt will select a random two-character salt from the character set .B [a-zA-Z0-9./] (for the traditional DES algorithm). .PP The allowable salts are system-specific. .B crypt(3) should contain a list of the permissible values. .PP If called with no arguments, .B crypt emits a short help message to standard error and returns 1. .SH "RETURN VALUE" .B crypt returns 0 upon success, or 1 if any error occurs. .SH EXAMPLES $ sudo grep '^mary:' /etc/shadow .br mary:pEcu81MYeYsDs:13000:::::: .PP $ crypt littlelamb pE .br pEcu81MYeYsDs .PP $ crypt littlelamb '$1$eoChiw6i' .br $1$eoChiw6i$5MlhhEDPAWW4KA6gWNK6s/ .SH NOTES .B pwgen(1) makes an excellent MD5 hash algorithm salt generator. .SH CAVEATS A randomly chosen salt may not be cryptographically strong. If this is a concern, one should supply a salt instead. .SH "SEE ALSO" crypt(3), pwgen(1), http://wooledge.org/~greg/crypt/ .SH AUTHOR Greg Wooledge .SH HISTORY This manual describes version 0.1 of the software.