On Tue, 20 Jul 2021 22:36:28 GMT, Valerie Peng <valer...@openjdk.org> wrote:
>> Initializing op in abstract GCMEngine would mean another 'if(encryption)', >> when that would not be needed in the GCMEncrypt() or GCMDecrypt(). I don't >> see why that is clearer. >> >> GaloisCounterMode.implGCMCrypt(...) is the intrinsic, so I have to use what >> is used by hotspot. > > Seems strange to have GCMOperation op defined in GCMEngine but not > initialized, nor used. The methods in GCMEngine which use op has an argument > named op anyway. Either you just use the "op" field (remove the "op" > argument) or the "op" argument (move the op field to GCMEncrypt/GCMDecrypt > class). Having both looks confusing. Ok.. Moving it into GCMEncrypt makes sense. Now that I look at the code GCMDecrypt only uses it when passed to a method. GCMEncrypt uses it ------------- PR: https://git.openjdk.java.net/jdk/pull/4019