diff --git a/programs/cipher/cipher_aead_demo.c b/programs/cipher/cipher_aead_demo.c index 0cee51f7cf..069c2ee50d 100644 --- a/programs/cipher/cipher_aead_demo.c +++ b/programs/cipher/cipher_aead_demo.c @@ -66,7 +66,8 @@ int main( void ) /* The real program starts here. */ -const char usage[] = "Usage: cipher_aead_demo [aes128-gcm|aes256-gcm|aes128-gcm_8|chachapoly]"; +const char usage[] = +"Usage: cipher_aead_demo [aes128-gcm|aes256-gcm|aes128-gcm_8|chachapoly]"; /* Dummy data for encryption: IV/nonce, additional data, 2-part message */ const unsigned char iv1[12] = { 0x00 }; @@ -175,7 +176,8 @@ static void aead_info( const mbedtls_cipher_context_t *ctx, size_t tag_len ) : mode == MBEDTLS_MODE_CHACHAPOLY ? "ChachaPoly" : "???"; - printf( "cipher: %s, %d, %s, %u\n", ciph, key_bits, mode_str, (unsigned) tag_len ); + printf( "cipher: %s, %d, %s, %u\n", + ciph, key_bits, mode_str, (unsigned) tag_len ); } /* diff --git a/programs/psa/aead_demo.c b/programs/psa/aead_demo.c index 7a07d8b0c4..5bc0af0297 100644 --- a/programs/psa/aead_demo.c +++ b/programs/psa/aead_demo.c @@ -4,9 +4,9 @@ * This program AEAD-encrypts a message, using the algorithm and key size * specified on the command line, using the multi-part API. * - * It comes with a companion program cipher/cipher_aead_demo.c, which does the same - * operations with the legacy Cipher API. The goal is that comparing the two - * programs will help people migrating to the PSA Crypto API. + * It comes with a companion program cipher/cipher_aead_demo.c, which does the + * same operations with the legacy Cipher API. The goal is that comparing the + * two programs will help people migrating to the PSA Crypto API. * * When used with multi-part AEAD operations, the `mbedtls_cipher_context` * serves a triple purpose (1) hold the key, (2) store the algorithm when no @@ -18,9 +18,10 @@ * On the other hand, with PSA, the algorithms encodes the desired tag length; * with Cipher the desired tag length needs to be tracked separately. * - * This program and its companion cipher/cipher_aead_demo.c illustrate this by doing the - * same sequence of multi-part AEAD computation with both APIs; looking at the - * two side by side should make the differences and similarities clear. + * This program and its companion cipher/cipher_aead_demo.c illustrate this by + * doing the same sequence of multi-part AEAD computation with both APIs; + * looking at the two side by side should make the differences and + * similarities clear. */ /* @@ -68,7 +69,8 @@ int main( void ) /* The real program starts here. */ -const char usage[] = "Usage: aead_demo [aes128-gcm|aes256-gcm|aes128-gcm_8|chachapoly]"; +const char usage[] = +"Usage: aead_demo [aes128-gcm|aes256-gcm|aes128-gcm_8|chachapoly]"; /* Dummy data for encryption: IV/nonce, additional data, 2-part message */ const unsigned char iv1[12] = { 0x00 }; diff --git a/programs/psa/hmac_demo.c b/programs/psa/hmac_demo.c index c6c320bdba..aa56b413be 100644 --- a/programs/psa/hmac_demo.c +++ b/programs/psa/hmac_demo.c @@ -13,9 +13,9 @@ * objects: (1) a psa_key_id_t to hold the key, and (2) a psa_operation_t for * multi-part progress. * - * This program and its companion hash/md_hmac_demo.c illustrate this by doing the - * same sequence of multi-part HMAC computation with both APIs; looking at the - * two side by side should make the differences and similarities clear. + * This program and its companion hash/md_hmac_demo.c illustrate this by doing + * the same sequence of multi-part HMAC computation with both APIs; looking at + * the two side by side should make the differences and similarities clear. */ /* @@ -118,7 +118,8 @@ psa_status_t hmac_demo(void) psa_set_key_type( &attributes, PSA_KEY_TYPE_HMAC ); psa_set_key_bits( &attributes, 8 * sizeof( key_bytes ) ); // optional - status = psa_import_key( &attributes, key_bytes, sizeof( key_bytes ), &key ); + status = psa_import_key( &attributes, + key_bytes, sizeof( key_bytes ), &key ); if( status != PSA_SUCCESS ) return( status );