summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt
diff options
context:
space:
mode:
authortedu <>2017-07-22 03:23:48 +0000
committertedu <>2017-07-22 03:23:48 +0000
commitfcfad53440247865e3427f6a7a1c8eec6616030c (patch)
treed3e35aad0fe332ea6c3cb7a2527fd97a3a8eeaf6 /src/lib/libc/crypt
parentf6b2dbc635dc388fe53d3df21e4a43cb4b51ad91 (diff)
downloadopenbsd-fcfad53440247865e3427f6a7a1c8eec6616030c.tar.gz
openbsd-fcfad53440247865e3427f6a7a1c8eec6616030c.tar.bz2
openbsd-fcfad53440247865e3427f6a7a1c8eec6616030c.zip
rework the page a bit, clarify a few things, maybe better wording
Diffstat (limited to 'src/lib/libc/crypt')
-rw-r--r--src/lib/libc/crypt/crypt_checkpass.321
1 files changed, 13 insertions, 8 deletions
diff --git a/src/lib/libc/crypt/crypt_checkpass.3 b/src/lib/libc/crypt/crypt_checkpass.3
index 5786c25a3a..9da5b984dc 100644
--- a/src/lib/libc/crypt/crypt_checkpass.3
+++ b/src/lib/libc/crypt/crypt_checkpass.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: crypt_checkpass.3,v 1.9 2015/07/23 22:20:02 tedu Exp $ 1.\" $OpenBSD: crypt_checkpass.3,v 1.10 2017/07/22 03:23:48 tedu Exp $
2.\" 2.\"
3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> 3.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: July 23 2015 $ 17.Dd $Mdocdate: July 22 2017 $
18.Dt CRYPT_CHECKPASS 3 18.Dt CRYPT_CHECKPASS 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -30,7 +30,7 @@
30.Sh DESCRIPTION 30.Sh DESCRIPTION
31The 31The
32.Fn crypt_checkpass 32.Fn crypt_checkpass
33function is provided to simplify checking a user's password. 33function simplifies checking a user's password.
34If both the 34If both the
35.Fa hash 35.Fa hash
36and the 36and the
@@ -53,11 +53,15 @@ A failure will return \-1 and set
53.Pp 53.Pp
54The 54The
55.Fn crypt_newhash 55.Fn crypt_newhash
56function is provided to simplify the creation of new password hashes. 56function simplifies the creation of new password hashes.
57The provided 57The provided
58.Fa password 58.Fa password
59is randomly salted and hashed and stored in 59is randomly salted and hashed and stored in
60.Fa hash . 60.Fa hash .
61The size of the available space is specified by
62.Fa hashsize ,
63which should be
64.Dv _PASSWORD_LEN .
61The 65The
62.Fa pref 66.Fa pref
63argument identifies the preferred hashing algorithm and parameters. 67argument identifies the preferred hashing algorithm and parameters.
@@ -66,9 +70,10 @@ Possible values are:
66.It Dq bcrypt,<rounds> 70.It Dq bcrypt,<rounds>
67The bcrypt algorithm, where the value of rounds can be between 4 and 31 and 71The bcrypt algorithm, where the value of rounds can be between 4 and 31 and
68specifies the base 2 logarithm of the number of rounds. 72specifies the base 2 logarithm of the number of rounds.
69The special rounds value 73If rounds is omitted or the special value
70.Sq a 74.Sq a ,
71automatically selects rounds based on system performance. 75an appropriate number of rounds is automatically selected based on system
76performance.
72.El 77.El
73.Sh RETURN VALUES 78.Sh RETURN VALUES
74.Rv -std crypt_checkpass crypt_newhash 79.Rv -std crypt_checkpass crypt_newhash
@@ -89,7 +94,7 @@ to
89.Er EINVAL 94.Er EINVAL
90if 95if
91.Fa pref 96.Fa pref
92is unsupported. 97is unsupported or insufficient space is provided.
93.Sh SEE ALSO 98.Sh SEE ALSO
94.Xr crypt 3 , 99.Xr crypt 3 ,
95.Xr login.conf 5 , 100.Xr login.conf 5 ,