diff options
author | Mattias Andrée <maandree@kth.se> | 2019-02-10 20:21:19 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2019-02-10 20:21:19 +0100 |
commit | ed0296b9055713df0d910e4e7528ffe6fc539514 (patch) | |
tree | 8cbf8ecc9b6352257d6bc4946ff75cb8a4b484c0 /libsha1_hmac_init.3 | |
download | libsha1-ed0296b9055713df0d910e4e7528ffe6fc539514.tar.gz libsha1-ed0296b9055713df0d910e4e7528ffe6fc539514.tar.bz2 libsha1-ed0296b9055713df0d910e4e7528ffe6fc539514.tar.xz |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libsha1_hmac_init.3')
-rw-r--r-- | libsha1_hmac_init.3 | 66 |
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) |