On Wed, 19 May 2021 23:10:07 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 757:
> 
>> 755:                             if (dst != null) {
>> 756:                                 dst.put(block, 0, 
>> Math.min(block.length, len));
>> 757:                             }
> 
> Would this method work correctly if dst is null? Shouldn't this be checked in 
> the beginning of this method?

Because this is a general purpose methods, the check for dst == null is when op 
is only ghash.  Null is not an exception situation.

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

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

Reply via email to