I\'m almost new to encryption.
I am trying to decrypt an array of bytes, and when I am providing the IV I am getting an exception : InvalidAlgorithmParameterExceptio
Solved.
I was using a wrong SecretKey, not the one you can create for AES.
Previously I had :
KeySpec spec = new PBEKeySpec(password.toCharArray(), encryptionKeySalt, 12345,256);
SecretKey encriptionKey = factory.generateSecret(spec);
which creates a JCEPBEKey.
I was missing :
Key encriptionKey = new SecretKeySpec(encriptionKey.getEncoded(), "AES");
which creates an appropiate key for AES.