blob: e44f7b2be99e6bc71476fb8879f91119b8bf923d [file] [log] [blame]
Guido van Rossum5c6e3731996-04-10 16:18:20 +00001\section{Built-in module {\tt crypt}}
2\bimodindex{crypt}
3
4This module implements an interface to the crypt({\bf 3}) routine,
5which is a one-way hash function based upon a modified DES algorithm;
6see the Unix man page for further details. Possible uses include
7allowing Python scripts to accept typed passwords from the user, or
8attempting to crack Unix passwords with a dictionary.
9\index{crypt(3)}
10
11\begin{funcdesc}{crypt}{word\, salt}
12\var{word} will usually be a user's password. \var{salt} is a
132-character string which will be used to select one of 4096 variations
14of DES. The characters in \var{salt} must be either \code{.},
15\code{/}, or an alphanumeric character. Returns the hashed password
16as a string, which will be composed of characters from the same
17alphabet as the salt.
18\end{funcdesc}
19
20The module and documentation were written by Steve Majewski.
21\index{Majewski, Steve}