AES 256bit encryption with Bouncy Castle: Unlimited Strength Policy still required?
I want to use AES 256bit encryption with Bouncy Castle and I'm wondering if the " Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files " are still required despite BC because I'm receiving a java.security.InvalidKeyException: Illegal key size exception for the following code: public class AES256 { public static void main(String[] args) throws Exception { Security.addProvider(new BouncyCastleProvider()); final KeyGenerator keyGen = KeyGenerator.getInstance("AES"); keyGen.init(256); // doesn't work for 192, too final byte[] encoded = keyGen.generateKey().getEncoded();