OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / crypt.3
index ca52b92..25cd734 100644 (file)
@@ -33,7 +33,7 @@
 .\" 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
@@ -65,7 +65,7 @@ is a user's typed password.
 .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
@@ -122,6 +122,12 @@ On success, a pointer to the encrypted password is returned.
 On error, NULL is returned.
 .SH ERRORS
 .TP
+.B EINVAL
+.I salt
+has the wrong format.
+.TP
+.B
+.TP
 .B ENOSYS
 The
 .BR crypt ()
@@ -160,6 +166,20 @@ function was not implemented, probably because of U.S.A. export restrictions.
 .\" .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.
@@ -221,7 +241,7 @@ SHA-512 | 86 characters
 .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
@@ -232,3 +252,12 @@ 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/.