1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
6 * The library is free for all purposes without any express
13 HMAC support, process data, Tom St Denis/Dobes Vandermeer
19 Process data through HMAC
20 @param hmac The hmac state
21 @param in The data to send through HMAC
22 @param inlen The length of the data to HMAC (octets)
23 @return CRYPT_OK if successful
25 int hmac_process(hmac_state *hmac, const unsigned char *in, unsigned long inlen)
28 LTC_ARGCHK(hmac != NULL);
29 LTC_ARGCHK(in != NULL);
30 if ((err = hash_is_valid(hmac->hash)) != CRYPT_OK) {
33 return hash_descriptor[hmac->hash].process(&hmac->md, in, inlen);
39 /* ref: $Format:%D$ */
40 /* git commit: $Format:%H$ */
41 /* commit time: $Format:%ai$ */