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