diff src/mac/omac/omac_process.c @ 209:39d5d58461d6 libtomcrypt-orig LTC_1.05

Import of libtomcrypt 1.05
author Matt Johnston <matt@ucc.asn.au>
date Wed, 06 Jul 2005 03:53:40 +0000
parents 1c15b283127b
children
line wrap: on
line diff
--- a/src/mac/omac/omac_process.c	Fri May 06 13:23:02 2005 +0000
+++ b/src/mac/omac/omac_process.c	Wed Jul 06 03:53:40 2005 +0000
@@ -27,7 +27,8 @@
 */
 int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
 {
-   int err, n, x;
+   unsigned long n, x;
+   int           err;
 
    LTC_ARGCHK(omac  != NULL);
    LTC_ARGCHK(in    != NULL);
@@ -57,7 +58,7 @@
    while (inlen != 0) { 
        /* ok if the block is full we xor in prev, encrypt and replace prev */
        if (omac->buflen == omac->blklen) {
-          for (x = 0; x < omac->blklen; x++) {
+          for (x = 0; x < (unsigned long)omac->blklen; x++) {
               omac->block[x] ^= omac->prev[x];
           }
           cipher_descriptor[omac->cipher_idx].ecb_encrypt(omac->block, omac->prev, &omac->key);
@@ -77,3 +78,7 @@
 
 #endif
 
+
+/* $Source: /cvs/libtom/libtomcrypt/src/mac/omac/omac_process.c,v $ */
+/* $Revision: 1.6 $ */
+/* $Date: 2005/05/05 14:35:58 $ */