Improve naming consistency
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
f6ea19c66c
commit
cf99beb8fe
2 changed files with 8 additions and 8 deletions
|
@ -181,8 +181,8 @@ static void aead_info( const mbedtls_cipher_context_t *ctx, size_t tag_len )
|
|||
static int aead_encrypt( mbedtls_cipher_context_t *ctx, size_t tag_len,
|
||||
const unsigned char *iv, size_t iv_len,
|
||||
const unsigned char *ad, size_t ad_len,
|
||||
const unsigned char *pa, size_t pa_len,
|
||||
const unsigned char *pb, size_t pb_len )
|
||||
const unsigned char *part1, size_t part1_len,
|
||||
const unsigned char *part2, size_t part2_len )
|
||||
{
|
||||
int ret;
|
||||
size_t olen;
|
||||
|
@ -192,9 +192,9 @@ static int aead_encrypt( mbedtls_cipher_context_t *ctx, size_t tag_len,
|
|||
CHK( mbedtls_cipher_set_iv( ctx, iv, iv_len ) );
|
||||
CHK( mbedtls_cipher_reset( ctx ) );
|
||||
CHK( mbedtls_cipher_update_ad( ctx, ad, ad_len ) );
|
||||
CHK( mbedtls_cipher_update( ctx, pa, pa_len, p, &olen ) );
|
||||
CHK( mbedtls_cipher_update( ctx, part1, part1_len, p, &olen ) );
|
||||
p += olen;
|
||||
CHK( mbedtls_cipher_update( ctx, pb, pb_len, p, &olen ) );
|
||||
CHK( mbedtls_cipher_update( ctx, part2, part2_len, p, &olen ) );
|
||||
p += olen;
|
||||
CHK( mbedtls_cipher_finish( ctx, p, &olen ) );
|
||||
p += olen;
|
||||
|
|
|
@ -197,8 +197,8 @@ static void aead_info( psa_key_id_t key, psa_algorithm_t alg )
|
|||
static int aead_encrypt( psa_key_id_t key, psa_algorithm_t alg,
|
||||
const unsigned char *iv, size_t iv_len,
|
||||
const unsigned char *ad, size_t ad_len,
|
||||
const unsigned char *pa, size_t pa_len,
|
||||
const unsigned char *pb, size_t pb_len )
|
||||
const unsigned char *part1, size_t part1_len,
|
||||
const unsigned char *part2, size_t part2_len )
|
||||
{
|
||||
psa_status_t status;
|
||||
size_t olen, olen_tag;
|
||||
|
@ -211,9 +211,9 @@ static int aead_encrypt( psa_key_id_t key, psa_algorithm_t alg,
|
|||
|
||||
PSA_CHECK( psa_aead_set_nonce( &op, iv, iv_len ) );
|
||||
PSA_CHECK( psa_aead_update_ad( &op, ad, ad_len ) );
|
||||
PSA_CHECK( psa_aead_update( &op, pa, pa_len, p, end - p, &olen ) );
|
||||
PSA_CHECK( psa_aead_update( &op, part1, part1_len, p, end - p, &olen ) );
|
||||
p += olen;
|
||||
PSA_CHECK( psa_aead_update( &op, pb, pb_len, p, end - p, &olen ) );
|
||||
PSA_CHECK( psa_aead_update( &op, part2, part2_len, p, end - p, &olen ) );
|
||||
p += olen;
|
||||
PSA_CHECK( psa_aead_finish( &op, p, end - p, &olen,
|
||||
tag, sizeof( tag ), &olen_tag ) );
|
||||
|
|
Loading…
Reference in a new issue