diff options
author | Paul Bakker <p.j.bakker@polarssl.org> | 2011-04-24 08:57:21 +0000 |
---|---|---|
committer | Paul Bakker <p.j.bakker@polarssl.org> | 2011-04-24 08:57:21 +0000 |
commit | 23986e5d5d501ae93bed161752708ba18fb9e016 (patch) | |
tree | c6e3d8251151695fcd38167c21af5e5290f915b3 /library/aes.c | |
parent | 1be81a4e5feca5b46aa886b55a0096f2dfb33c1b (diff) | |
download | mbedtls-23986e5d5d501ae93bed161752708ba18fb9e016.zip mbedtls-23986e5d5d501ae93bed161752708ba18fb9e016.tar.gz mbedtls-23986e5d5d501ae93bed161752708ba18fb9e016.tar.bz2 |
- Major type rewrite of int to size_t for most variables and arguments used for buffer lengths and loops
Diffstat (limited to 'library/aes.c')
-rw-r--r-- | library/aes.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/library/aes.c b/library/aes.c index 7e768e0..ce418d6 100644 --- a/library/aes.c +++ b/library/aes.c @@ -36,8 +36,6 @@ #include "polarssl/aes.h" #include "polarssl/padlock.h" -#include <string.h> - /* * 32-bit integer manipulation macros (little endian) */ @@ -441,9 +439,9 @@ static void aes_gen_tables( void ) /* * AES key schedule (encryption) */ -int aes_setkey_enc( aes_context *ctx, const unsigned char *key, int keysize ) +int aes_setkey_enc( aes_context *ctx, const unsigned char *key, unsigned int keysize ) { - int i; + unsigned int i; unsigned long *RK; #if !defined(POLARSSL_AES_ROM_TABLES) @@ -546,7 +544,7 @@ int aes_setkey_enc( aes_context *ctx, const unsigned char *key, int keysize ) /* * AES key schedule (decryption) */ -int aes_setkey_dec( aes_context *ctx, const unsigned char *key, int keysize ) +int aes_setkey_dec( aes_context *ctx, const unsigned char *key, unsigned int keysize ) { int i, j; aes_context cty; @@ -758,7 +756,7 @@ int aes_crypt_ecb( aes_context *ctx, */ int aes_crypt_cbc( aes_context *ctx, int mode, - int length, + size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output ) @@ -823,7 +821,7 @@ int aes_crypt_cbc( aes_context *ctx, */ int aes_crypt_cfb128( aes_context *ctx, int mode, - int length, + size_t length, int *iv_off, unsigned char iv[16], const unsigned char *input, |