3
|
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis |
|
2 * |
|
3 * LibTomCrypt is a library that provides various cryptographic |
|
4 * algorithms in a highly modular and flexible manner. |
|
5 * |
|
6 * The library is free for all purposes without any express |
|
7 * guarantee it works. |
|
8 * |
|
9 * Tom St Denis, [email protected], http://libtomcrypt.org |
|
10 */ |
|
11 /* Submited by Dobes Vandermeer ([email protected]) */ |
|
12 |
|
13 #include "mycrypt.h" |
|
14 |
|
15 #ifdef HMAC |
|
16 |
|
17 int hmac_process(hmac_state *hmac, const unsigned char *buf, unsigned long len) |
|
18 { |
|
19 int err; |
|
20 _ARGCHK(hmac != NULL); |
|
21 _ARGCHK(buf != NULL); |
|
22 if ((err = hash_is_valid(hmac->hash)) != CRYPT_OK) { |
|
23 return err; |
|
24 } |
|
25 return hash_descriptor[hmac->hash].process(&hmac->md, buf, len); |
|
26 } |
|
27 |
|
28 #endif |
|
29 |