aboutsummaryrefslogtreecommitdiffstats
path: root/libsha1_hmac_init.3
diff options
context:
space:
mode:
Diffstat (limited to 'libsha1_hmac_init.3')
-rw-r--r--libsha1_hmac_init.366
1 files changed, 66 insertions, 0 deletions
diff --git a/libsha1_hmac_init.3 b/libsha1_hmac_init.3
new file mode 100644
index 0000000..b1e2617
--- /dev/null
+++ b/libsha1_hmac_init.3
@@ -0,0 +1,66 @@
+.TH LIBSHA1_HMAC_INIT 3 2019-02-10 libsha1
+.SH NAME
+libsha1_hmac_init \- Initialises hashing with an HMAC-SHA 1/0 algorithm
+.SH SYNOPSIS
+.nf
+#include <libsha1.h>
+
+enum libsha1_algorithm {
+ LIBSHA1_0, /* SHA-0 */
+ LIBSHA1_1 /* SHA-1 */
+};
+
+int libsha1_hmac_init(struct libsha1_hmac_state *restrict \fIstate\fP, enum libsha1_algorithm \fIalgorithm\fP,
+ const void *restrict \fIkey\fP, size_t \fIkeylen\fP);
+.fi
+.PP
+Link with
+.IR \-lsha1 .
+.SH DESCRIPTION
+The
+.BR libsha1_hmac_init ()
+function stores the selected
+.I algorithm
+in
+.I state
+and initialises
+.I state
+with the first
+.I keylen
+bits of
+.I key
+as the key.
+.SH RETURN VALUE
+The
+.BR libsha1_hmac_init ()
+function returns 0 upon successful completion,
+otherwise -1 is returned and
+.I errno
+is set appropriately.
+.SH ERRORS
+The
+.BR libsha1_hmac_init ()
+function will fail if:
+.TP
+.B EINVAL
+.I algorithm
+is not a valid
+.B enum libsha1_algorithm
+value.
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsha1_hmac_digest (3),
+.BR libsha1_hmac_marshal (3),
+.BR libsha1_hmac_unmarshal (3),
+.BR libsha1_hmac_update (3)