Browse Source

rework the page a bit, clarify a few things, maybe better wording

OPENBSD_6_2
tedu 7 years ago
parent
commit
bce15ce0c1
1 changed files with 13 additions and 8 deletions
  1. +13
    -8
      src/lib/libc/crypt/crypt_checkpass.3

+ 13
- 8
src/lib/libc/crypt/crypt_checkpass.3 View File

@ -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> .\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
.\" .\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" 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 .Dt CRYPT_CHECKPASS 3
.Os .Os
.Sh NAME .Sh NAME
@ -30,7 +30,7 @@
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn crypt_checkpass .Fn crypt_checkpass
function is provided to simplify checking a user's password.
function simplifies checking a user's password.
If both the If both the
.Fa hash .Fa hash
and the and the
@ -53,11 +53,15 @@ A failure will return \-1 and set
.Pp .Pp
The The
.Fn crypt_newhash .Fn crypt_newhash
function is provided to simplify the creation of new password hashes.
function simplifies the creation of new password hashes.
The provided The provided
.Fa password .Fa password
is randomly salted and hashed and stored in is randomly salted and hashed and stored in
.Fa hash . .Fa hash .
The size of the available space is specified by
.Fa hashsize ,
which should be
.Dv _PASSWORD_LEN .
The The
.Fa pref .Fa pref
argument identifies the preferred hashing algorithm and parameters. argument identifies the preferred hashing algorithm and parameters.
@ -66,9 +70,10 @@ Possible values are:
.It Dq bcrypt,<rounds> .It Dq bcrypt,<rounds>
The bcrypt algorithm, where the value of rounds can be between 4 and 31 and 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. 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 .El
.Sh RETURN VALUES .Sh RETURN VALUES
.Rv -std crypt_checkpass crypt_newhash .Rv -std crypt_checkpass crypt_newhash
@ -89,7 +94,7 @@ to
.Er EINVAL .Er EINVAL
if if
.Fa pref .Fa pref
is unsupported.
is unsupported or insufficient space is provided.
.Sh SEE ALSO .Sh SEE ALSO
.Xr crypt 3 , .Xr crypt 3 ,
.Xr login.conf 5 , .Xr login.conf 5 ,


Loading…
Cancel
Save