1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Doc: clarify the preconditions for psa_cipher_update

This commit is contained in:
Gilles Peskine
2018-07-12 20:15:32 +02:00
committed by itayzafrir
parent 6ac73a912b
commit 9ac9426731

View File

@ -1963,12 +1963,12 @@ psa_status_t psa_cipher_set_iv(psa_cipher_operation_t *operation,
/** Encrypt or decrypt a message fragment in an active cipher operation.
*
* The application must call psa_cipher_encrypt_setup() or
* psa_cipher_decrypt_setup() before calling this function. The choice
* of setup function determines whether this function encrypts or
* decrypts its input. After calling a setup function, if the chosen
* algorithm requires an IV, the application must call
* psa_cipher_generate_iv() or psa_cipher_set_iv().
* Before calling this function, you must:
* 1. Call either psa_cipher_encrypt_setup() or psa_cipher_decrypt_setup().
* The choice of setup function determines whether this function
* encrypts or decrypts its input.
* 2. If the algorithm requires an IV, call psa_cipher_generate_iv()
* (recommended when encrypting) or psa_cipher_set_iv().
*
* If this function returns an error status, the operation becomes inactive.
*