summaryrefslogtreecommitdiffstats
path: root/crypto/md2
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2004-05-15 11:29:55 +0000
committerAndy Polyakov <appro@openssl.org>2004-05-15 11:29:55 +0000
commit9e0aad9fd60635e240f7742fa1497eced6f1cd0b (patch)
tree3bcdb1f59b421e626a2c94ea743ccc4d18628c1c /crypto/md2
parent1c7a0e2856bce20267174375fd66007fa172354d (diff)
size_t-fication of message digest APIs. We should size_t-fy more APIs...
Diffstat (limited to 'crypto/md2')
-rw-r--r--crypto/md2/md2.h4
-rw-r--r--crypto/md2/md2_dgst.c6
-rw-r--r--crypto/md2/md2_one.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/crypto/md2/md2.h b/crypto/md2/md2.h
index 6fcb9b1bdc..45bf4cc29c 100644
--- a/crypto/md2/md2.h
+++ b/crypto/md2/md2.h
@@ -81,9 +81,9 @@ typedef struct MD2state_st
const char *MD2_options(void);
int MD2_Init(MD2_CTX *c);
-int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len);
+int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len);
int MD2_Final(unsigned char *md, MD2_CTX *c);
-unsigned char *MD2(const unsigned char *d, unsigned long n,unsigned char *md);
+unsigned char *MD2(const unsigned char *d, size_t n,unsigned char *md);
#ifdef __cplusplus
}
#endif
diff --git a/crypto/md2/md2_dgst.c b/crypto/md2/md2_dgst.c
index ecb64f0ec4..15e77d60be 100644
--- a/crypto/md2/md2_dgst.c
+++ b/crypto/md2/md2_dgst.c
@@ -125,7 +125,7 @@ int MD2_Init(MD2_CTX *c)
return 1;
}
-int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len)
+int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len)
{
register UCHAR *p;
@@ -145,7 +145,7 @@ int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len)
}
else
{
- memcpy(&(p[c->num]),data,(int)len);
+ memcpy(&(p[c->num]),data,len);
/* data+=len; */
c->num+=(int)len;
return 1;
@@ -159,7 +159,7 @@ int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len)
data+=MD2_BLOCK;
len-=MD2_BLOCK;
}
- memcpy(p,data,(int)len);
+ memcpy(p,data,len);
c->num=(int)len;
return 1;
}
diff --git a/crypto/md2/md2_one.c b/crypto/md2/md2_one.c
index 835160ef56..dab35071ac 100644
--- a/crypto/md2/md2_one.c
+++ b/crypto/md2/md2_one.c
@@ -63,7 +63,7 @@
/* This is a separate file so that #defines in cryptlib.h can
* map my MD functions to different names */
-unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md)
+unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md)
{
MD2_CTX c;
static unsigned char m[MD2_DIGEST_LENGTH];