Rename len to bitlen in function parameters

Clarify a few comments too.
This commit is contained in:
Manuel Pégourié-Gonnard 2015-06-18 14:58:58 +02:00
parent 6934afa234
commit b8186a5e54
15 changed files with 58 additions and 58 deletions

View file

@ -69,12 +69,12 @@ void mbedtls_ccm_init( mbedtls_ccm_context *ctx )
int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx,
mbedtls_cipher_id_t cipher,
const unsigned char *key,
unsigned int keysize )
unsigned int keybits )
{
int ret;
const mbedtls_cipher_info_t *cipher_info;
cipher_info = mbedtls_cipher_info_from_values( cipher, keysize, MBEDTLS_MODE_ECB );
cipher_info = mbedtls_cipher_info_from_values( cipher, keybits, MBEDTLS_MODE_ECB );
if( cipher_info == NULL )
return( MBEDTLS_ERR_CCM_BAD_INPUT );
@ -86,7 +86,7 @@ int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx,
if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 )
return( ret );
if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keysize,
if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits,
MBEDTLS_ENCRYPT ) ) != 0 )
{
return( ret );