diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2017-07-22 03:23:49 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2017-07-22 03:23:49 +0000 |
commit | 04ab161c88a4e178baeb4e3a5e35aabd9e9abef6 (patch) | |
tree | 4db4ca09407dce857471e530b788a47893892127 /lib/libc | |
parent | 2c2ba04ed6ae748ff7723ac1e2f6fee82c1f54d9 (diff) |
rework the page a bit, clarify a few things, maybe better wording
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/crypt/crypt_checkpass.3 | 21 |
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 , |