diff options
author | Andy Polyakov <appro@openssl.org> | 2004-05-15 11:29:55 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2004-05-15 11:29:55 +0000 |
commit | 9e0aad9fd60635e240f7742fa1497eced6f1cd0b (patch) | |
tree | 3bcdb1f59b421e626a2c94ea743ccc4d18628c1c /crypto/sha | |
parent | 1c7a0e2856bce20267174375fd66007fa172354d (diff) |
size_t-fication of message digest APIs. We should size_t-fy more APIs...
Diffstat (limited to 'crypto/sha')
-rw-r--r-- | crypto/sha/sha.h | 8 | ||||
-rw-r--r-- | crypto/sha/sha1_one.c | 2 | ||||
-rw-r--r-- | crypto/sha/sha_locl.h | 16 | ||||
-rw-r--r-- | crypto/sha/sha_one.c | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/crypto/sha/sha.h b/crypto/sha/sha.h index 9ef21414e5..aa4c9dd5d7 100644 --- a/crypto/sha/sha.h +++ b/crypto/sha/sha.h @@ -102,16 +102,16 @@ typedef struct SHAstate_st #ifndef OPENSSL_NO_SHA0 int SHA_Init(SHA_CTX *c); -int SHA_Update(SHA_CTX *c, const void *data, unsigned long len); +int SHA_Update(SHA_CTX *c, const void *data, size_t len); int SHA_Final(unsigned char *md, SHA_CTX *c); -unsigned char *SHA(const unsigned char *d, unsigned long n,unsigned char *md); +unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md); void SHA_Transform(SHA_CTX *c, const unsigned char *data); #endif #ifndef OPENSSL_NO_SHA1 int SHA1_Init(SHA_CTX *c); -int SHA1_Update(SHA_CTX *c, const void *data, unsigned long len); +int SHA1_Update(SHA_CTX *c, const void *data, size_t len); int SHA1_Final(unsigned char *md, SHA_CTX *c); -unsigned char *SHA1(const unsigned char *d, unsigned long n,unsigned char *md); +unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); void SHA1_Transform(SHA_CTX *c, const unsigned char *data); #endif diff --git a/crypto/sha/sha1_one.c b/crypto/sha/sha1_one.c index 20e660c71d..582b25394c 100644 --- a/crypto/sha/sha1_one.c +++ b/crypto/sha/sha1_one.c @@ -62,7 +62,7 @@ #include <openssl/crypto.h> #ifndef OPENSSL_NO_SHA1 -unsigned char *SHA1(const unsigned char *d, unsigned long n, unsigned char *md) +unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) { SHA_CTX c; static unsigned char m[SHA_DIGEST_LENGTH]; diff --git a/crypto/sha/sha_locl.h b/crypto/sha/sha_locl.h index 48c0ac6422..01fc6e22eb 100644 --- a/crypto/sha/sha_locl.h +++ b/crypto/sha/sha_locl.h @@ -92,8 +92,8 @@ # define HASH_BLOCK_DATA_ORDER sha_block_data_order # define Xupdate(a,ix,ia,ib,ic,id) (ix=(a)=(ia^ib^ic^id)) - void sha_block_host_order (SHA_CTX *c, const void *p,int num); - void sha_block_data_order (SHA_CTX *c, const void *p,int num); + void sha_block_host_order (SHA_CTX *c, const void *p,size_t num); + void sha_block_data_order (SHA_CTX *c, const void *p,size_t num); #elif defined(SHA_1) @@ -123,8 +123,8 @@ # define HASH_BLOCK_DATA_ORDER_ALIGNED sha1_block_asm_data_order # endif # endif - void sha1_block_host_order (SHA_CTX *c, const void *p,int num); - void sha1_block_data_order (SHA_CTX *c, const void *p,int num); + void sha1_block_host_order (SHA_CTX *c, const void *p,size_t num); + void sha1_block_data_order (SHA_CTX *c, const void *p,size_t num); #else # error "Either SHA_0 or SHA_1 must be defined." @@ -223,7 +223,7 @@ int HASH_INIT (SHA_CTX *c) #endif #ifndef DONT_IMPLEMENT_BLOCK_HOST_ORDER -void HASH_BLOCK_HOST_ORDER (SHA_CTX *c, const void *d, int num) +void HASH_BLOCK_HOST_ORDER (SHA_CTX *c, const void *d, size_t num) { const SHA_LONG *W=d; register unsigned MD32_REG_T A,B,C,D,E,T; @@ -348,7 +348,7 @@ void HASH_BLOCK_HOST_ORDER (SHA_CTX *c, const void *d, int num) #endif #ifndef DONT_IMPLEMENT_BLOCK_DATA_ORDER -void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, int num) +void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, size_t num) { const unsigned char *data=p; register unsigned MD32_REG_T A,B,C,D,E,T,l; @@ -505,7 +505,7 @@ void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, int num) A=ROTATE(A,5)+T+xa; } while(0) #ifndef DONT_IMPLEMENT_BLOCK_HOST_ORDER -void HASH_BLOCK_HOST_ORDER (SHA_CTX *c, const void *d, int num) +void HASH_BLOCK_HOST_ORDER (SHA_CTX *c, const void *d, size_t num) { const SHA_LONG *W=d; register unsigned MD32_REG_T A,B,C,D,E,T; @@ -551,7 +551,7 @@ void HASH_BLOCK_HOST_ORDER (SHA_CTX *c, const void *d, int num) #endif #ifndef DONT_IMPLEMENT_BLOCK_DATA_ORDER -void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, int num) +void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, size_t num) { const unsigned char *data=p; register unsigned MD32_REG_T A,B,C,D,E,T,l; diff --git a/crypto/sha/sha_one.c b/crypto/sha/sha_one.c index e61c63f3e9..371ffddac6 100644 --- a/crypto/sha/sha_one.c +++ b/crypto/sha/sha_one.c @@ -62,7 +62,7 @@ #include <openssl/crypto.h> #ifndef OPENSSL_NO_SHA0 -unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) +unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md) { SHA_CTX c; static unsigned char m[SHA_DIGEST_LENGTH]; |