mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Rename key_length in cipher_info
This commit is contained in:
@ -191,7 +191,7 @@ typedef struct {
|
||||
|
||||
/** Cipher key length, in bits (default length for variable sized ciphers)
|
||||
* (Includes parity bits for ciphers like DES) */
|
||||
unsigned int key_length;
|
||||
unsigned int key_bitlen;
|
||||
|
||||
/** Name of the cipher */
|
||||
const char * name;
|
||||
@ -219,7 +219,7 @@ typedef struct {
|
||||
const mbedtls_cipher_info_t *cipher_info;
|
||||
|
||||
/** Key length to use */
|
||||
int key_length;
|
||||
int key_bitlen;
|
||||
|
||||
/** Operation that the context's key has been initialised for */
|
||||
mbedtls_operation_t operation;
|
||||
@ -420,7 +420,7 @@ static inline int mbedtls_cipher_get_key_size( const mbedtls_cipher_context_t *c
|
||||
if( NULL == ctx || NULL == ctx->cipher_info )
|
||||
return MBEDTLS_KEY_LENGTH_NONE;
|
||||
|
||||
return ctx->cipher_info->key_length;
|
||||
return ctx->cipher_info->key_bitlen;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -79,11 +79,11 @@ struct mbedtls_cipher_base_t
|
||||
|
||||
/** Set key for encryption purposes */
|
||||
int (*setkey_enc_func)( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length );
|
||||
unsigned int key_bitlen );
|
||||
|
||||
/** Set key for decryption purposes */
|
||||
int (*setkey_dec_func)( void *ctx, const unsigned char *key,
|
||||
unsigned int key_length);
|
||||
unsigned int key_bitlen);
|
||||
|
||||
/** Allocate a new context */
|
||||
void * (*ctx_alloc_func)( void );
|
||||
|
@ -71,7 +71,7 @@ int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode,
|
||||
* \param salt Salt to use when generating key
|
||||
* \param slen Length of salt
|
||||
* \param iteration_count Iteration count
|
||||
* \param key_length Length of generated key
|
||||
* \param key_length Length of generated key in bytes
|
||||
* \param output Generated key. Must be at least as big as key_length
|
||||
*
|
||||
* \returns 0 on success, or a MBEDTLS_ERR_XXX code if verification fails.
|
||||
|
Reference in New Issue
Block a user