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

> * Given the current checkCipherState() impl does not check for states for 
> NullCipher objects, do we want to also update the javax.crypto.NullCipher 
> class javadoc to mention that IllegalStateException is not thrown by various 
> methods?

Current documentation is:

"The {@code NullCipher} class is a class that provides an "identity cipher" -- 
one that does not transform the plain text.  As a consequence, the ciphertext 
is identical to the plaintext.  All initialization methods do nothing, while 
the blocksize is set to 1 byte."

Would it be sufficient for me to add "Unlike other ciphers, the {@code 
NullCipher} will not throw an {@code IllegalStateException} when in an 
incorrect state."

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

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

Reply via email to