On Mon, 25 Sep 2023 23:48:49 GMT, Valerie Peng <valer...@openjdk.org> wrote:

> * Cipher.updateAAD(...) methods also calls checkCipherState(), so its javadoc 
> should be updated as well?

The current documentation for Cipher.updateAAD(...) is:

"@throws IllegalStateException if this {@code Cipher} object is in a wrong 
state (e.g., has not been initialized), does not accept AAD, or if operating in 
either GCM or CCM mode and one of the {@code update} methods has already been 
called for the active encryption/decryption operation"

This seems fairly explicit, but I could change the wording to 

"@throws IllegalStateException if this {@code Cipher} object is in a wrong 
state (e.g., has not been initialized, or is not in ENCRYPT_MODE or 
DECRYPT_MODE)"

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15727#issuecomment-1743888605

Reply via email to