mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 06:35:22 +00:00
Improve info() function in cipher_aead_demo
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
64754e1b8d
commit
5e6c884315
@ -167,8 +167,9 @@ exit:
|
||||
*/
|
||||
static void aead_info( const mbedtls_cipher_context_t *ctx, size_t tag_len )
|
||||
{
|
||||
// no convenient way to get the just cipher type (for example, AES)
|
||||
const char *ciph = "???";
|
||||
mbedtls_cipher_type_t type = mbedtls_cipher_get_type( ctx );
|
||||
const mbedtls_cipher_info_t *info = mbedtls_cipher_info_from_type( type );
|
||||
const char *ciph = mbedtls_cipher_info_get_name( info );
|
||||
int key_bits = mbedtls_cipher_get_key_bitlen( ctx );
|
||||
mbedtls_cipher_mode_t mode = mbedtls_cipher_get_cipher_mode( ctx );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user