On Fri, 4 Jun 2021 00:16:55 GMT, Anthony Scarpino <[email protected]> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java
>> line 776:
>>
>>> 774: if (dst != null) {
>>> 775: dst.put(block, 0, len);
>>> 776: }
>>
>> Can this be "resultLen += op.doFinal(block, 0, len, dst)"?
>
> doFinal doesn't have a (byte[], int, int, ByteBuffer) method. While that's
> not a bad idea to have one, it would be a fair bit of code to do it because
> it's part of the GCM interface and I'd have to write methods for GCTRGHASH,
> GCTR, and GHASH. I think that's too much just for this one code segment
> that isn't broken.
Sure, sounds reasonable.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4072