diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/crypt/crypt.3 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/lib/libc/crypt/crypt.3 b/src/lib/libc/crypt/crypt.3 index 95eb8c156d..a1912f8a45 100644 --- a/src/lib/libc/crypt/crypt.3 +++ b/src/lib/libc/crypt/crypt.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: crypt.3,v 1.38 2014/05/16 22:11:00 jmc Exp $ | 1 | .\" $OpenBSD: crypt.3,v 1.39 2014/11/17 16:47:28 tedu Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" FreeSec: libcrypt | 3 | .\" FreeSec: libcrypt |
| 4 | .\" | 4 | .\" |
| @@ -31,7 +31,7 @@ | |||
| 31 | .\" | 31 | .\" |
| 32 | .\" Manual page, using -mandoc macros | 32 | .\" Manual page, using -mandoc macros |
| 33 | .\" | 33 | .\" |
| 34 | .Dd $Mdocdate: May 16 2014 $ | 34 | .Dd $Mdocdate: November 17 2014 $ |
| 35 | .Dt CRYPT 3 | 35 | .Dt CRYPT 3 |
| 36 | .Os | 36 | .Os |
| 37 | .Sh NAME | 37 | .Sh NAME |
| @@ -55,6 +55,8 @@ | |||
| 55 | .Ft int | 55 | .Ft int |
| 56 | .Fn crypt_checkpass "const char *password" "const char *hash" | 56 | .Fn crypt_checkpass "const char *password" "const char *hash" |
| 57 | .Ft int | 57 | .Ft int |
| 58 | .Fn crypt_newhash "const char *password" "login_cap_t *lc" "char *hash" "size_t hashsize" | ||
| 59 | .Ft int | ||
| 58 | .Fn encrypt "char *block" "int flag" | 60 | .Fn encrypt "char *block" "int flag" |
| 59 | .Ft int | 61 | .Ft int |
| 60 | .Fn des_setkey "const char *key" | 62 | .Fn des_setkey "const char *key" |
| @@ -102,6 +104,19 @@ If the hash is NULL, authentication will always fail, but a default | |||
| 102 | amount of work is performed to simulate the hashing operation. | 104 | amount of work is performed to simulate the hashing operation. |
| 103 | A successful match will return 0. | 105 | A successful match will return 0. |
| 104 | A failure will return \-1 and set errno. | 106 | A failure will return \-1 and set errno. |
| 107 | .Pp | ||
| 108 | The | ||
| 109 | .Fn crypt_newhash | ||
| 110 | function is provided to simplify the creation of new password hashes. | ||
| 111 | The provided | ||
| 112 | .Fa password | ||
| 113 | is randomly salted and hashed and stored in | ||
| 114 | .Fa hash . | ||
| 115 | The login class argument | ||
| 116 | .Fa lc | ||
| 117 | is used to identify the preferred hashing algorithm and parameters. | ||
| 118 | Refer to | ||
| 119 | .Xr login.conf 5 . | ||
| 105 | .Ss Extended crypt | 120 | .Ss Extended crypt |
| 106 | The | 121 | The |
| 107 | .Ar key | 122 | .Ar key |
