gpg.bc: Supress errorprone InsecureCryptoUsage

From errorprone doc: "Dynamically constructed transformation strings
are also flagged, as they may conceal an instance of ECB mode."

https://errorprone.info/bugpattern/InsecureCryptoUsage

Silence the message as a quick relief.

Change-Id: I348f0fff0e3b24ce1f11917e849b4095b186d1f0
motiejus-detectSymlinkSupport
Ivan Frade 2023-11-17 10:14:26 -08:00
parent 5c173c632d
commit 52af8dbaff
1 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,10 @@ class OCBPBEProtectionRemoverFactory
.getSymmetricCipherName(encAlgorithm);
byte[] decrypted = null;
try {
// errorprone: "Dynamically constructed transformation
// strings are also flagged, as they may conceal an instance
// of ECB mode."
@SuppressWarnings("InsecureCryptoUsage")
Cipher c = Cipher
.getInstance(algorithmName + "/OCB/NoPadding"); //$NON-NLS-1$
SecretKey secretKey = new SecretKeySpec(key, algorithmName);