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
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java index 68f8a45..3924d68 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/OCBPBEProtectionRemoverFactory.java
@@ -75,6 +75,10 @@ public PBESecretKeyDecryptor createDecryptor(String protection) .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);