mbedtls_cipher_finish() function
The generic cipher finalization function. If data still needs to be flushed from an incomplete block, the data contained in it is padded to the size of the last block, and written to the \p output buffer.
Arguments
ctx
The generic cipher context. This must be initialized and bound to a key.
output
The buffer to write data to. This needs to be a writable buffer of at least \p block_size Bytes.
olen
The length of the data written to the \p output buffer. This may not be \c NULL.
Return value
\c 0 on success. #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on parameter-verification failure. #MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED on decryption expecting a full block but not receiving one. #MBEDTLS_ERR_CIPHER_INVALID_PADDING on invalid padding while decrypting. A cipher-specific error code on failure.
Functions calling mbedtls_cipher_finish()
mbedtls_cipher_finish()
Data read by mbedtls_cipher_finish()
mbedtls_cipher_finish()