diff options
author | Andy Polyakov <appro@openssl.org> | 2004-05-15 13:29:55 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2004-05-15 13:29:55 +0200 |
commit | 9e0aad9fd60635e240f7742fa1497eced6f1cd0b (patch) | |
tree | 3bcdb1f59b421e626a2c94ea743ccc4d18628c1c /crypto/md5 | |
parent | Reimplement old functions, so older software that link to libcrypto (diff) | |
download | openssl-9e0aad9fd60635e240f7742fa1497eced6f1cd0b.tar.xz openssl-9e0aad9fd60635e240f7742fa1497eced6f1cd0b.zip |
size_t-fication of message digest APIs. We should size_t-fy more APIs...
Diffstat (limited to 'crypto/md5')
-rw-r--r-- | crypto/md5/md5.h | 4 | ||||
-rw-r--r-- | crypto/md5/md5_dgst.c | 4 | ||||
-rw-r--r-- | crypto/md5/md5_locl.h | 6 | ||||
-rw-r--r-- | crypto/md5/md5_one.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/crypto/md5/md5.h b/crypto/md5/md5.h index a252e02115..587d947b9a 100644 --- a/crypto/md5/md5.h +++ b/crypto/md5/md5.h @@ -105,9 +105,9 @@ typedef struct MD5state_st } MD5_CTX; int MD5_Init(MD5_CTX *c); -int MD5_Update(MD5_CTX *c, const void *data, unsigned long len); +int MD5_Update(MD5_CTX *c, const void *data, size_t len); int MD5_Final(unsigned char *md, MD5_CTX *c); -unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md); +unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); void MD5_Transform(MD5_CTX *c, const unsigned char *b); #ifdef __cplusplus } diff --git a/crypto/md5/md5_dgst.c b/crypto/md5/md5_dgst.c index 9c7abc3697..f97f48e55b 100644 --- a/crypto/md5/md5_dgst.c +++ b/crypto/md5/md5_dgst.c @@ -83,7 +83,7 @@ int MD5_Init(MD5_CTX *c) } #ifndef md5_block_host_order -void md5_block_host_order (MD5_CTX *c, const void *data, int num) +void md5_block_host_order (MD5_CTX *c, const void *data, size_t num) { const MD5_LONG *X=data; register unsigned MD32_REG_T A,B,C,D; @@ -176,7 +176,7 @@ void md5_block_host_order (MD5_CTX *c, const void *data, int num) #ifdef X #undef X #endif -void md5_block_data_order (MD5_CTX *c, const void *data_, int num) +void md5_block_data_order (MD5_CTX *c, const void *data_, size_t num) { const unsigned char *data=data_; register unsigned MD32_REG_T A,B,C,D,l; diff --git a/crypto/md5/md5_locl.h b/crypto/md5/md5_locl.h index 9e360da732..b29f0de7e3 100644 --- a/crypto/md5/md5_locl.h +++ b/crypto/md5/md5_locl.h @@ -69,13 +69,13 @@ # if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) # define md5_block_host_order md5_block_asm_host_order # elif defined(__sparc) && defined(OPENSSL_SYS_ULTRASPARC) - void md5_block_asm_data_order_aligned (MD5_CTX *c, const MD5_LONG *p,int num); + void md5_block_asm_data_order_aligned (MD5_CTX *c, const MD5_LONG *p,size_t num); # define HASH_BLOCK_DATA_ORDER_ALIGNED md5_block_asm_data_order_aligned # endif #endif -void md5_block_host_order (MD5_CTX *c, const void *p,int num); -void md5_block_data_order (MD5_CTX *c, const void *p,int num); +void md5_block_host_order (MD5_CTX *c, const void *p,size_t num); +void md5_block_data_order (MD5_CTX *c, const void *p,size_t num); #if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) /* diff --git a/crypto/md5/md5_one.c b/crypto/md5/md5_one.c index c5dd2d81db..9918243ea2 100644 --- a/crypto/md5/md5_one.c +++ b/crypto/md5/md5_one.c @@ -65,7 +65,7 @@ #include <openssl/ebcdic.h> #endif -unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md) +unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md) { MD5_CTX c; static unsigned char m[MD5_DIGEST_LENGTH]; |