Update PSA_CIPHER_ENCRYPT_OUTPUT_SIZE

Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
gabor-mezei-arm 2021-03-10 15:57:44 +01:00
parent 286a36e17d
commit 9c3b5077e6
No known key found for this signature in database
GPG Key ID: 106F5A41ECC305BD

View File

@ -952,8 +952,8 @@
#define PSA_CIPHER_ENCRYPT_OUTPUT_SIZE(key_type, alg, input_length) \ #define PSA_CIPHER_ENCRYPT_OUTPUT_SIZE(key_type, alg, input_length) \
(alg == PSA_ALG_CBC_PKCS7 ? \ (alg == PSA_ALG_CBC_PKCS7 ? \
PSA_ROUND_UP_TO_MULTIPLE(PSA_BLOCK_CIPHER_BLOCK_LENGTH(key_type), \ PSA_ROUND_UP_TO_MULTIPLE(PSA_BLOCK_CIPHER_BLOCK_LENGTH(key_type), \
(input_length) + PSA_CIPHER_IV_LENGTH((key_type), \ (input_length) + 1) + \
(alg))) : \ PSA_CIPHER_IV_LENGTH((key_type), (alg)) : \
(PSA_ALG_IS_CIPHER(alg) ? \ (PSA_ALG_IS_CIPHER(alg) ? \
(input_length) + PSA_CIPHER_IV_LENGTH((key_type), (alg)) : \ (input_length) + PSA_CIPHER_IV_LENGTH((key_type), (alg)) : \
0)) 0))