- Major type rewrite of int to size_t for most variables and arguments used for buffer lengths and loops

This commit is contained in:
Paul Bakker 2011-04-24 08:57:21 +00:00
parent 1be81a4e5f
commit 23986e5d5d
67 changed files with 1041 additions and 949 deletions

View file

@ -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,