Make some lengths size_t's.
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 3 Apr 2009 15:44:08 +0000 (15:44 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 3 Apr 2009 15:44:08 +0000 (15:44 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27942 f5534014-38df-0310-8fa8-9805f1628bb7

epan/crypt/crypt-md5.c
epan/crypt/crypt-md5.h

index fcb1e5b8933b6468ab4e124fd9d0e6cd3bec84f4..81b5bb9023f791d1293fcf8d99429afab30590f8 100644 (file)
@@ -91,7 +91,7 @@ void md5_init(md5_state_t *ctx)
  * Update context to reflect the concatenation of another buffer full
  * of bytes.
  */
-void md5_append( md5_state_t *ctx, unsigned char const *buf, unsigned len)
+void md5_append( md5_state_t *ctx, unsigned char const *buf, size_t len)
 {
     guint32 t;
 
@@ -100,7 +100,7 @@ void md5_append( md5_state_t *ctx, unsigned char const *buf, unsigned len)
     t = ctx->bits[0];
     if ((ctx->bits[0] = t + ((guint32) len << 3)) < t)
        ctx->bits[1]++;         /* Carry from low to high */
-    ctx->bits[1] += len >> 29;
+    ctx->bits[1] += (guint32) len >> 29;
 
     t = (t >> 3) & 0x3f;       /* Bytes already in shsInfo->data */
 
@@ -292,7 +292,7 @@ static void MD5Transform(guint32 buf[4], guint32 const in[16])
  ** Function: hmac_md5
  */
 
-void md5_hmac(const guint8* text, gint text_len, const guint8* key, gint key_len, guint8 digest[16]) {
+void md5_hmac(const guint8* text, size_t text_len, const guint8* key, size_t key_len, guint8 digest[16]) {
        MD5_CTX context;
        guint8 k_ipad[65];    /* inner padding -
                * key XORd with ipad
index c585007bebc6d21531dd64878a2bd38aee122bd1..97d7fd7c0ebfbe2b2ee5e56a0cfa4953f806e0f8 100644 (file)
@@ -53,7 +53,7 @@ void md5_init(md5_state_t *pms);
  *  @param nbytes      Length of data.
  */
 void md5_append( md5_state_t *pms, 
-                            const guint8 *data, guint nbytes);
+                            const guint8 *data, size_t nbytes);
 
 /** Finish the message and return the digest. 
  *  @param pms         MD5 context.
@@ -62,7 +62,7 @@ void md5_append( md5_state_t *pms,
 void md5_finish(md5_state_t *pms, guint8 digest[16]);
 
 
-void md5_hmac(const guint8* text, gint text_len, const guint8* key, gint key_len, guint8 digest[16]);
+void md5_hmac(const guint8* text, size_t text_len, const guint8* key, size_t key_len, guint8 digest[16]);
 
 /**
  * @}