diff options
author | Andy Polyakov <appro@openssl.org> | 2008-10-31 19:30:11 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2008-10-31 19:30:11 +0000 |
commit | f768be81d804d0467be4ad7163216c8381872b94 (patch) | |
tree | bcedfdc8d80fbf521deefa7f95d4aaef8f18f86c /crypto/rc4/rc4_enc.c | |
parent | 91173829db3f10a5237ea28ed9e1c0c1f69cb05b (diff) | |
download | openssl-f768be81d804d0467be4ad7163216c8381872b94.tar.gz |
size_t-fy AES, Camellia and RC4.
Diffstat (limited to 'crypto/rc4/rc4_enc.c')
-rw-r--r-- | crypto/rc4/rc4_enc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/rc4/rc4_enc.c b/crypto/rc4/rc4_enc.c index d5f18a3a70..37ef43c16c 100644 --- a/crypto/rc4/rc4_enc.c +++ b/crypto/rc4/rc4_enc.c @@ -67,12 +67,12 @@ * Date: Wed, 14 Sep 1994 06:35:31 GMT */ -void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, +void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, unsigned char *outdata) { register RC4_INT *d; register RC4_INT x,y,tx,ty; - int i; + size_t i; x=key->x; y=key->y; @@ -120,8 +120,8 @@ void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, (RC4_CHUNK)d[(tx+ty)&0xff]\ ) - if ( ( ((unsigned long)indata & (sizeof(RC4_CHUNK)-1)) | - ((unsigned long)outdata & (sizeof(RC4_CHUNK)-1)) ) == 0 ) + if ( ( ((size_t)indata & (sizeof(RC4_CHUNK)-1)) | + ((size_t)outdata & (sizeof(RC4_CHUNK)-1)) ) == 0 ) { RC4_CHUNK ichunk,otp; const union { long one; char little; } is_endian = {1}; @@ -276,7 +276,7 @@ void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, #define RC4_LOOP(a,b,i) LOOP(a[i],b[i]) #endif - i=(int)(len>>3L); + i=len>>3; if (i) { for (;;) @@ -296,7 +296,7 @@ void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, if (--i == 0) break; } } - i=(int)len&0x07; + i=len&0x07; if (i) { for (;;) |