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
This commit is contained in:
parent
5c173c632d
commit
52af8dbaff
|
@ -75,6 +75,10 @@ public byte[] recoverKeyData(int encAlgorithm, byte[] key,
|
|||
.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);
|
||||
|
|
Loading…
Reference in New Issue