aboutsummaryrefslogtreecommitdiffstats
path: root/epan/crypt
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-04-03 15:44:08 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-04-03 15:44:08 +0000
commit206490e782e004fb7352e92d6a7ec4a42aea54e0 (patch)
treeb97e05732c8c3a380e620209e24037c4e198ecb4 /epan/crypt
parentd3ca4f39461c3c2f51abe0efcfb4bb9660d5335f (diff)
Make some lengths size_t's.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27942 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/crypt')
-rw-r--r--epan/crypt/crypt-md5.c6
-rw-r--r--epan/crypt/crypt-md5.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/epan/crypt/crypt-md5.c b/epan/crypt/crypt-md5.c
index fcb1e5b893..81b5bb9023 100644
--- a/epan/crypt/crypt-md5.c
+++ b/epan/crypt/crypt-md5.c
@@ -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
diff --git a/epan/crypt/crypt-md5.h b/epan/crypt/crypt-md5.h
index c585007beb..97d7fd7c0e 100644
--- a/epan/crypt/crypt-md5.h
+++ b/epan/crypt/crypt-md5.h
@@ -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]);
/**
* @}