On Wed, 17 May 2023 07:10:49 GMT, Ferenc Rakoczi <d...@openjdk.org> wrote:

>> Weijun Wang has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   to and length and comments
>
> src/java.base/share/classes/javax/crypto/KEM.java line 233:
> 
>> 231:          *          of the shared secret as a 128-bit AES key.
>> 232:          * @throws IndexOutOfBoundsException if {@code from < 0},
>> 233:          *     {@code from > to}, or {@code to > secretSize()}
> 
> Shouldn't this say "{@code to - from > secretSize()}"?

`from` and `to` are indexes into the secret itself, so it's indeed `to` cannot 
exceed `secretSize()`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1196492411

Reply via email to