From 5fee208ff24dae6351d5e56a7482142067a4cb44 Mon Sep 17 00:00:00 2001 From: Max Fillinger Date: Sun, 21 Nov 2021 16:10:54 +0100 Subject: [PATCH] Make new IV and block size getters return size_t Signed-off-by: Max Fillinger --- include/mbedtls/cipher.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mbedtls/cipher.h b/include/mbedtls/cipher.h index a99a50ff6..b5d3e6136 100644 --- a/include/mbedtls/cipher.h +++ b/include/mbedtls/cipher.h @@ -516,13 +516,13 @@ static inline const char *mbedtls_cipher_info_get_name( * \return The recommended IV size. * \return \c 0 for ciphers not using an IV or a nonce. */ -static inline int mbedtls_cipher_info_get_iv_size( +static inline size_t mbedtls_cipher_info_get_iv_size( const mbedtls_cipher_info_t *info ) { if( info == NULL ) return( 0 ); - return( (int) info->MBEDTLS_PRIVATE(iv_size) ); + return( (size_t) info->MBEDTLS_PRIVATE(iv_size) ); } /** @@ -533,13 +533,13 @@ static inline int mbedtls_cipher_info_get_iv_size( * * \return The block size of the cipher. */ -static inline unsigned int mbedtls_cipher_info_get_block_size( +static inline size_t mbedtls_cipher_info_get_block_size( const mbedtls_cipher_info_t *info ) { if( info == NULL ) return( 0 ); - return( info->MBEDTLS_PRIVATE(block_size) ); + return( (size_t) info->MBEDTLS_PRIVATE(block_size) ); } /**