Want to use AES 256 CBC with 32 bytes but it shows java.security.InvalidAlgorithmParameterException
问题 I am using AES 256 CBC. I have 32 bytes of IV. But when i run this it shows an exception as: Exception in thread "main" java.lang.RuntimeException: java.security.InvalidAlgorithmParameterException: Wrong IV length: must be 16 bytes long at com.abc.aes265cbc.AESUtil.decrypt(AESUtil.java:50) at com.abc.aes265cbc.Security.main(Security.java:48) Caused by: java.security.InvalidAlgorithmParameterException: Wrong IV length: must be 16 bytes long at com.sun.crypto.provider.CipherCore.init(CipherCore