.\" added _XOPEN_SOURCE, aeb, 970705
.\" added GNU MD5 stuff, aeb, 011223
.\"
-.TH CRYPT 3 2011-09-15 "" "Linux Programmer's Manual"
+.TH CRYPT 3 2014-02-26 "" "Linux Programmer's Manual"
.SH NAME
crypt, crypt_r \- password and data encryption
.SH SYNOPSIS
.PP
.I salt
is a two-character string chosen from the set
-[\fBa\fP\(en\fBzA\fP\(en\fBZ0\fP\(en\fB9./\fP].
+[\fBa\-zA\-Z0\-9./\fP].
This string is used to
perturb the algorithm in one of 4096 different ways.
.PP
On error, NULL is returned.
.SH ERRORS
.TP
+.B EINVAL
+.I salt
+has the wrong format.
+.TP
+.B
+.TP
.B ENOSYS
The
.BR crypt ()
.\" .PP
.\" Making encrypted data computed using crypt() publicly available has
.\" to be considered insecure for the given reasons.
+.TP
+.B EPERM
+.I /proc/sys/crypto/fips_enabled
+has a nonzero value,
+and an attempt was made to use a weak encryption type, such as DES.
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR crypt ()
+function is not thread-safe.
+.LP
+The
+.BR crypt_r ()
+function is thread-safe.
.SH CONFORMING TO
.BR crypt ():
SVr4, 4.3BSD, POSIX.1-2001.
.TE
The characters in "\fIsalt\fP" and "\fIencrypted\fP" are drawn from the set
-[\fBa\fP\(en\fBzA\fP\(en\fBZ0\fP\(en\fB9./\fP].
+[\fBa\-zA\-Z0\-9./\fP].
In the MD5 and SHA implementations the entire
.I key
is significant (instead of only the first
.BR encrypt (3),
.BR getpass (3),
.BR passwd (5)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.