PSA_CIPHER_DECRYPT_OUTPUT_SIZE macro
The maximum size of the output of psa_cipher_decrypt(), in bytes. If the size of the output buffer is at least this large, it is guaranteed that psa_cipher_decrypt() will not fail due to an insufficient buffer size. Depending on the algorithm, the actual size of the output might be smaller. See also #PSA_CIPHER_DECRYPT_OUTPUT_MAX_SIZE(\p input_length).
Syntax
#define PSA_CIPHER_DECRYPT_OUTPUT_SIZE(key_type, alg, input_length) \
(PSA_ALG_IS_CIPHER(alg) && \
((key_type) & PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_SYMMETRIC ? \
(input_length) : \
0u)
Arguments
key_type
A symmetric key type that is compatible with algorithm alg.
alg
A cipher algorithm (\c PSA_ALG_XXX value such that #PSA_ALG_IS_CIPHER(\p alg) is true).
input_length
Size of the input in bytes.
Return value
A sufficient output size for the specified key type and algorithm. If the key type or cipher algorithm is not recognized, or the parameters are incompatible, return 0.