Home | History | Annotate | Download | only in hmac

Lines Matching refs:hmac

15   HMAC support, terminate stream, Tom St Denis/Dobes Vandermeer
23 Terminate an HMAC session
24 @param hmac The HMAC state
25 @param out [out] The destination of the HMAC authentication tag
26 @param outlen [in/out] The max size and resulting size of the HMAC authentication tag
29 int hmac_done(hmac_state *hmac, unsigned char *out, unsigned long *outlen)
35 LTC_ARGCHK(hmac != NULL);
39 hash = hmac->hash;
60 /* Get the hash of the first HMAC vector plus the data */
61 if ((err = hash_descriptor[hash].done(&hmac->md, isha)) != CRYPT_OK) {
65 /* Create the second HMAC vector vector for step (3) */
67 buf[i] = hmac->key[i] ^ 0x5C;
71 if ((err = hash_descriptor[hash].init(&hmac->md)) != CRYPT_OK) {
74 if ((err = hash_descriptor[hash].process(&hmac->md, buf, HMAC_BLOCKSIZE)) != CRYPT_OK) {
77 if ((err = hash_descriptor[hash].process(&hmac->md, isha, hashsize)) != CRYPT_OK) {
80 if ((err = hash_descriptor[hash].done(&hmac->md, buf)) != CRYPT_OK) {
92 XFREE(hmac->key);
96 zeromem(hmac, sizeof(*hmac));
107 /* $Source: /cvs/libtom/libtomcrypt/src/mac/hmac/hmac_done.c,v $ */