Fri Jul 1 22:56:06 2016 UTC ()
Improve wording.


(christos)
diff -r1.1 -r1.2 src/lib/libc/hash/hmac.3

cvs diff -r1.1 -r1.2 src/lib/libc/hash/hmac.3 (expand / switch to unified diff)

--- src/lib/libc/hash/hmac.3 2016/07/01 22:41:39 1.1
+++ src/lib/libc/hash/hmac.3 2016/07/01 22:56:06 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: hmac.3,v 1.1 2016/07/01 22:41:39 christos Exp $ 1.\" $NetBSD: hmac.3,v 1.2 2016/07/01 22:56:06 christos Exp $
2.\" 2.\"
3.Dd July 1, 2016 3.Dd July 1, 2016
4.Dt HMAC 3 4.Dt HMAC 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
7.Nm hmac , 7.Nm hmac ,
8.Nd Compute a key-Hash Message Authentication Code 8.Nd Compute a key-Hash Message Authentication Code
9.Sh LIBRARY 9.Sh LIBRARY
10.Lb libc 10.Lb libc
11.Sh SYNOPSIS 11.Sh SYNOPSIS
12.In stdlib.h 12.In stdlib.h
13.Ft ssize_t 13.Ft ssize_t
14.Fn hmac "const char *hname" "const void *key" "size_t klen" "const void *text" "size_t tlen" "void *digest" "size_t dlen" 14.Fn hmac "const char *hname" "const void *key" "size_t klen" "const void *text" "size_t tlen" "void *digest" "size_t dlen"
@@ -19,33 +19,35 @@ function computes the key-Hash Message A @@ -19,33 +19,35 @@ function computes the key-Hash Message A
19.%R RFC 2104  19.%R RFC 2104
20and places the result in 20and places the result in
21.Fa digest 21.Fa digest
22writing up to 22writing up to
23.Fa dlen 23.Fa dlen
24bytes. 24bytes.
25The actual number of bytes that would be written is returned. 25The actual number of bytes that would be written is returned.
26.Pp 26.Pp
27The hash functions supported are: md2, md4, md5, rmd160, sha1, sha224, 27The hash functions supported are: md2, md4, md5, rmd160, sha1, sha224,
28sha256, sha384, sha512. 28sha256, sha384, sha512.
29.Sh RETURN VALUES 29.Sh RETURN VALUES
30The 30The
31.Fn hmac 31.Fn hmac
32return  32returns
33.Dv -1 33.Dv -1
34if the 34if the
35.Fa hname 35.Fa hname
36is not found 36is not found.
37and the length of the digest string which is dependend on the hashing 37Otherwise the actual length of the digest string is returned (which could
38function. 38be bigger or smaller than
 39.Fa dlen ) .
 40This length depends on the hashing function selected.
39.Sh SEE ALSO 41.Sh SEE ALSO
40.Xr md2 3 , 42.Xr md2 3 ,
41.Xr md4 3 , 43.Xr md4 3 ,
42.Xr md5 3 , 44.Xr md5 3 ,
43.Xr rmd160 3 , 45.Xr rmd160 3 ,
44.Xr sha1 3 , 46.Xr sha1 3 ,
45.Xr sha2 3 47.Xr sha2 3
46.Sh STANDARDS 48.Sh STANDARDS
47.%R RFC 2104 49.%R RFC 2104
48.Sh NOTES 50.Sh NOTES
49The maximum digest length has been extended from  51The maximum digest length has been extended from
50.Dv 64 52.Dv 64
51to 53to