On Thu, 20 May 2021 01:17:14 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Fix perf problem by reorganizing doLastBlock()
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java 
> line 975:
> 
>> 973:                 doUpdate(in, inOff, inLen, output, 0);
>> 974:             } catch (ShortBufferException e) {
>> 975:                 // update decryption has no output
> 
> The comment does not seems to make sense? This is GCMEncrypt class. The right 
> reason should be that the output array is allocated by the provider and 
> should have the right size. However, it seems safer to throw 
> AssertionException() instead of swallowing the SBE...

Yeah the comment isn't right.  I think it's excessive to throw an exception 
that should never happen, but I'll add a ProviderException.

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

PR: https://git.openjdk.java.net/jdk/pull/4072

Reply via email to