|
|
@ -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 , |
|
|
|