Skip to content

Commit

Permalink
Remove unused (and incorrect) implementation of getOutputSizeForFinal. (
Browse files Browse the repository at this point in the history
#1274)

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.
  • Loading branch information
juergw authored Dec 12, 2024
1 parent 82b4b51 commit de879b1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions common/src/main/java/org/conscrypt/OpenSSLAeadCipher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit de879b1

Please sign in to comment.