summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortedu <>2014-05-16 21:34:48 +0000
committertedu <>2014-05-16 21:34:48 +0000
commit2f8f9362d2d70acfb97c157c29912721a7d2613f (patch)
treefb7796cb7bcb2c4015edc901207340272a90f964 /src
parent124db4e5c16f888f2cd4b5dde29ca6a3e6736cbb (diff)
downloadopenbsd-2f8f9362d2d70acfb97c157c29912721a7d2613f.tar.gz
openbsd-2f8f9362d2d70acfb97c157c29912721a7d2613f.tar.bz2
openbsd-2f8f9362d2d70acfb97c157c29912721a7d2613f.zip
document crypt_checkpass
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/crypt/crypt.315
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/libc/crypt/crypt.3 b/src/lib/libc/crypt/crypt.3
index 8d5681d67a..09d1691b5a 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.36 2014/05/16 14:12:19 sthen Exp $ 1.\" $OpenBSD: crypt.3,v 1.37 2014/05/16 21:34:48 tedu Exp $
2.\" 2.\"
3.\" FreeSec: libcrypt 3.\" FreeSec: libcrypt
4.\" 4.\"
@@ -52,6 +52,8 @@
52.Ft char * 52.Ft char *
53.Fn crypt "const char *key" "const char *setting" 53.Fn crypt "const char *key" "const char *setting"
54.Ft int 54.Ft int
55.Fn crypt_checkpass "const char *password" "const char *hash"
56.Ft int
55.Fn encrypt "char *block" "int flag" 57.Fn encrypt "char *block" "int flag"
56.Ft int 58.Ft int
57.Fn des_setkey "const char *key" 59.Fn des_setkey "const char *key"
@@ -88,6 +90,17 @@ and a number then a different algorithm is used depending on the number.
88At the moment 90At the moment
89.Ql $2 91.Ql $2
90chooses Blowfish hashing; see below for more information. 92chooses Blowfish hashing; see below for more information.
93.Pp
94The
95.Fn crypt_checkpass
96function is provided to simplify checking a user's password.
97If both the hash and the password are the empty string, authentication
98is a success.
99Otherwise, the password is hashed and compared to the provided hash.
100If the hash is NULL, authentication will always fail, but a default
101amount of work is performed to simulate the hashing operation.
102A successful match will return 0.
103A failure will return -1 and set errno.
91.Ss Extended crypt 104.Ss Extended crypt
92The 105The
93.Ar key 106.Ar key