From ad910abd196be723bb8aa253ba23541b97c95225 Mon Sep 17 00:00:00 2001 From: juergw Date: Wed, 11 Dec 2024 10:47:05 +0000 Subject: [PATCH] Remove unused (and incorrect) implementation of getOutputSizeForFinal. This method gets overwritten by all its subclasses, so it is never used. Also, it is incorrect, because it doesn't subtract the tag size on decryption. --- common/src/main/java/org/conscrypt/OpenSSLAeadCipher.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/common/src/main/java/org/conscrypt/OpenSSLAeadCipher.java b/common/src/main/java/org/conscrypt/OpenSSLAeadCipher.java index b2cb6b794..196a3f2a9 100644 --- a/common/src/main/java/org/conscrypt/OpenSSLAeadCipher.java +++ b/common/src/main/java/org/conscrypt/OpenSSLAeadCipher.java @@ -436,12 +436,6 @@ int getOutputSizeForUpdate(int inputLen) { return 0; } - @Override - int getOutputSizeForFinal(int inputLen) { - return bufCount + inputLen - + (isEncrypting() ? NativeCrypto.EVP_AEAD_max_overhead(evpAead) : 0); - } - // Intentionally missing Override to compile on old versions of Android @SuppressWarnings("MissingOverride") protected void engineUpdateAAD(byte[] input, int inputOffset, int inputLen) {