Environment
| Component |
Version |
| Java |
24 |
| SpotBugs |
4.9.4 |
| FindSecBugs |
1.14.0 |
Problem
This code triggers STATIC_IV error when I believe it should not.
private AlgorithmParameterSpec getKeyParameters(byte[] iv) {
if("GCM".equals(getAlgorithmMode()))
return new GCMParameterSpec(128, iv, 0, iv.length);
else
return new IvParameterSpec(iv, 0, iv.length);
}
I checked, and all of the calls through this class are using an iv either passed-in from a caller (e.g. for decryption), or generated locally using a random source (encryption).
Environment
Problem
This code triggers
STATIC_IVerror when I believe it should not.I checked, and all of the calls through this class are using an
iveither passed-in from a caller (e.g. for decryption), or generated locally using a random source (encryption).