PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE macro
A sufficient output buffer size for psa_aead_encrypt(), for any of the supported key types and AEAD algorithms. If the size of the ciphertext buffer is at least this large, it is guaranteed that psa_aead_encrypt() will not fail due to an insufficient buffer size. See also #PSA_AEAD_ENCRYPT_OUTPUT_SIZE(\p key_type, \p alg, \p plaintext_length).
Syntax
#define PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE(plaintext_length) \
((plaintext_length) + PSA_AEAD_TAG_MAX_SIZE)
Arguments
plaintext_length
Size of the plaintext in bytes.
Return value
A sufficient output buffer size for any of the supported key types and AEAD algorithms.
Notes
This macro returns a compile-time constant if its arguments are compile-time constants.