On Fri, 6 Mar 2026 07:07:48 GMT, Shawn Emery <[email protected]> wrote:

>> I think we should add this error condition to the `InvalidKeyException` 
>> text. This will require a CSR.
>
> @seanjmullan I've filed one, let me know if this is what you were looking 
> for.  Thank you.

I also recommend updating the `@throws InvalidKeyException` to state that it is 
also thrown if the offset is negative. For example:

"if offset is negative, or the given key material is <code>null</code>, or 
starting at <code>offset</code> inclusive, is shorter than 8 bytes."

Arguably, throwing `IllegalArgumentException` is more appropriate, but I think 
that would have a higher compatibility risk since it would be a new exception 
thrown (even though DES/DESede really shouldn't be used much anymore).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30069#discussion_r2896003343

Reply via email to