summaryrefslogtreecommitdiff
path: root/epan/crypt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-04-03 15:44:08 +0000
committerGerald Combs <gerald@wireshark.org>2009-04-03 15:44:08 +0000
commit1b60cf384607f3130f49e4f5d0948ad90787088a (patch)
treeb97e05732c8c3a380e620209e24037c4e198ecb4 /epan/crypt
parent342a836bba1e52a50f157a7f4362d37a1be7803c (diff)
downloadwireshark-1b60cf384607f3130f49e4f5d0948ad90787088a.tar.gz
Make some lengths size_t's.
svn path=/trunk/; revision=27942
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]);
/**
* @}