blob: 132ae514ee0efebdb0bc0c435e9cfae409b65e38 [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
Fred Drake4b3f0311996-12-13 22:04:31 +000011\renewcommand{\indexsubitem}{(in module crypt)}
Guido van Rossum5c6e3731996-04-10 16:18:20 +000012\begin{funcdesc}{crypt}{word\, salt}
13\var{word} will usually be a user's password. \var{salt} is a
142-character string which will be used to select one of 4096 variations
15of DES. The characters in \var{salt} must be either \code{.},
16\code{/}, or an alphanumeric character. Returns the hashed password
17as a string, which will be composed of characters from the same
18alphabet as the salt.
19\end{funcdesc}
20
21The module and documentation were written by Steve Majewski.
22\index{Majewski, Steve}