xref: /lighttpd1.4/src/algo_hmac.h (revision d97eeefa)
1 /* algo_hmac - hash-based message authentication code (HMAC) wrapper
2  *
3  * Copyright(c) 2021 Glenn Strauss gstrauss()gluelogic.com  All rights reserved
4  * License: BSD 3-clause (same as lighttpd)
5  */
6 #ifndef INCLUDED_ALGO_HMAC_H
7 #define INCLUDED_ALGO_HMAC_H
8 #include "first.h"
9 
10 int
11 li_hmac_md5 (unsigned char digest[16], /* [MD5_DIGEST_LENGTH] */
12              const void * const secret, const uint32_t slen,
13              const unsigned char * const msg, const uint32_t mlen);
14 
15 int
16 li_hmac_sha1 (unsigned char digest[20], /* [SHA_DIGEST_LENGTH] */
17               const void * const secret, const uint32_t slen,
18               const unsigned char * const msg, const uint32_t mlen);
19 
20 int
21 li_hmac_sha256 (unsigned char digest[32], /* [SHA256_DIGEST_LENGTH] */
22                 const void * const secret, const uint32_t slen,
23                 const unsigned char * const msg, const uint32_t mlen);
24 
25 int
26 li_hmac_sha512 (unsigned char digest[64], /* [SHA512_DIGEST_LENGTH] */
27                 const void * const secret, const uint32_t slen,
28                 const unsigned char * const msg, const uint32_t mlen);
29 
30 
31 #endif /* INCLUDED_ALGO_HMAC_H */
32