diff libtomcrypt/src/mac/hmac/hmac_done.c @ 1439:8d24733026c5 coverity

merge
author Matt Johnston <matt@ucc.asn.au>
date Sat, 24 Jun 2017 23:33:16 +0800
parents f849a5ca2efc
children 6dba84798cd5
line wrap: on
line diff
--- a/libtomcrypt/src/mac/hmac/hmac_done.c	Sat Jun 03 00:10:58 2017 +0800
+++ b/libtomcrypt/src/mac/hmac/hmac_done.c	Sat Jun 24 23:33:16 2017 +0800
@@ -6,24 +6,24 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.com
+ * Tom St Denis, [email protected], http://libtom.org
  */
 #include "tomcrypt.h"
 
 /**
   @file hmac_done.c
-  HMAC support, terminate stream, Tom St Denis/Dobes Vandermeer
+  LTC_HMAC support, terminate stream, Tom St Denis/Dobes Vandermeer
 */
 
 #ifdef LTC_HMAC
 
-#define HMAC_BLOCKSIZE hash_descriptor[hash].blocksize
+#define LTC_HMAC_BLOCKSIZE hash_descriptor[hash].blocksize
 
 /**
-   Terminate an HMAC session
-   @param hmac    The HMAC state
-   @param out     [out] The destination of the HMAC authentication tag
-   @param outlen  [in/out]  The max size and resulting size of the HMAC authentication tag
+   Terminate an LTC_HMAC session
+   @param hmac    The LTC_HMAC state
+   @param out     [out] The destination of the LTC_HMAC authentication tag
+   @param outlen  [in/out]  The max size and resulting size of the LTC_HMAC authentication tag
    @return CRYPT_OK if successful
 */
 int hmac_done(hmac_state *hmac, unsigned char *out, unsigned long *outlen)
@@ -44,13 +44,12 @@
     /* get the hash message digest size */
     hashsize = hash_descriptor[hash].hashsize;
 
-    /* Get the hash of the first HMAC vector plus the data */
     if ((err = hash_descriptor[hash].done(&hmac->md, isha)) != CRYPT_OK) {
        goto LBL_ERR;
     }
 
-    /* Create the second HMAC vector vector for step (3) */
-    for(i=0; i < HMAC_BLOCKSIZE; i++) {
+    /* Create the second LTC_HMAC vector vector for step (3) */
+    for(i=0; i < LTC_HMAC_BLOCKSIZE; i++) {
         buf[i] = hmac->key[i] ^ 0x5C;
     }
 
@@ -58,7 +57,7 @@
     if ((err = hash_descriptor[hash].init(&hmac->md)) != CRYPT_OK) {
        goto LBL_ERR;
     }
-    if ((err = hash_descriptor[hash].process(&hmac->md, buf, HMAC_BLOCKSIZE)) != CRYPT_OK) {
+    if ((err = hash_descriptor[hash].process(&hmac->md, buf, LTC_HMAC_BLOCKSIZE)) != CRYPT_OK) {
        goto LBL_ERR;
     }
     if ((err = hash_descriptor[hash].process(&hmac->md, isha, hashsize)) != CRYPT_OK) {
@@ -88,6 +87,6 @@
 
 #endif
 
-/* $Source: /cvs/libtom/libtomcrypt/src/mac/hmac/hmac_done.c,v $ */
-/* $Revision: 1.5 $ */
-/* $Date: 2006/11/03 00:39:49 $ */
+/* $Source$ */
+/* $Revision$ */
+/* $Date$ */