summaryrefslogtreecommitdiffstats
path: root/lib/libc/crypt/crypt_checkpass.3
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2017-07-22 03:23:48 +0000
committertedu <tedu@openbsd.org>2017-07-22 03:23:48 +0000
commit5386115845eef2c1bb2dcce1d4273055d087a1af (patch)
tree8d404c3be226f118da0b6bf95b1c83d63a34c4e1 /lib/libc/crypt/crypt_checkpass.3
parentUse the actual width written rather than the possible width to clear. (diff)
downloadwireguard-openbsd-5386115845eef2c1bb2dcce1d4273055d087a1af.tar.xz
wireguard-openbsd-5386115845eef2c1bb2dcce1d4273055d087a1af.zip
rework the page a bit, clarify a few things, maybe better wording
Diffstat (limited to 'lib/libc/crypt/crypt_checkpass.3')
-rw-r--r--lib/libc/crypt/crypt_checkpass.321
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/libc/crypt/crypt_checkpass.3 b/lib/libc/crypt/crypt_checkpass.3
index 5786c25a3a8..9da5b984dc3 100644
--- a/lib/libc/crypt/crypt_checkpass.3
+++ b/lib/libc/crypt/crypt_checkpass.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: crypt_checkpass.3,v 1.9 2015/07/23 22:20:02 tedu Exp $
+.\" $OpenBSD: crypt_checkpass.3,v 1.10 2017/07/22 03:23:48 tedu Exp $
.\"
.\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 23 2015 $
+.Dd $Mdocdate: July 22 2017 $
.Dt CRYPT_CHECKPASS 3
.Os
.Sh NAME
@@ -30,7 +30,7 @@
.Sh DESCRIPTION
The
.Fn crypt_checkpass
-function is provided to simplify checking a user's password.
+function simplifies checking a user's password.
If both the
.Fa hash
and the
@@ -53,11 +53,15 @@ A failure will return \-1 and set
.Pp
The
.Fn crypt_newhash
-function is provided to simplify the creation of new password hashes.
+function simplifies the creation of new password hashes.
The provided
.Fa password
is randomly salted and hashed and stored in
.Fa hash .
+The size of the available space is specified by
+.Fa hashsize ,
+which should be
+.Dv _PASSWORD_LEN .
The
.Fa pref
argument identifies the preferred hashing algorithm and parameters.
@@ -66,9 +70,10 @@ Possible values are:
.It Dq bcrypt,<rounds>
The bcrypt algorithm, where the value of rounds can be between 4 and 31 and
specifies the base 2 logarithm of the number of rounds.
-The special rounds value
-.Sq a
-automatically selects rounds based on system performance.
+If rounds is omitted or the special value
+.Sq a ,
+an appropriate number of rounds is automatically selected based on system
+performance.
.El
.Sh RETURN VALUES
.Rv -std crypt_checkpass crypt_newhash
@@ -89,7 +94,7 @@ to
.Er EINVAL
if
.Fa pref
-is unsupported.
+is unsupported or insufficient space is provided.
.Sh SEE ALSO
.Xr crypt 3 ,
.Xr login.conf 5 ,