log.warn("Obfuscation not possible due to weak crypto policy.");
return in;
}
final Digest digest = new SHA256Digest();
final PKCS12ParametersGenerator pGen = new PKCS12ParametersGenerator(digest);
pGen.init(
PBEParametersGenerator.PKCS12PasswordToBytes(p),
getSalt(),
iCount);
final ParametersWithIV params = (ParametersWithIV)pGen.generateDerivedParameters(192, 128);
final SecretKeySpec encKey = new SecretKeySpec(((KeyParameter)params.getParameters()).getKey(), "AES");
final Cipher c;
c = Cipher.getInstance("AES/CBC/PKCS7Padding", "BC");
c.init(Cipher.ENCRYPT_MODE, encKey, new IvParameterSpec(params.getIV()));