如题,在idea执行以下代码报错。
public static void main(String[] args) { String key = AesKit.genAesKey(); String content = "hello jfinal"; byte[] encrypt = AesKit.encrypt(content, key); }
Exception in thread "main" java.lang.RuntimeException: Illegal key size at com.jfinal.kit.AesKit.encrypt(AesKit.java:60) at com.jfinal.kit.AesKit.encrypt(AesKit.java:30) at com.jfinal.app.search.index.IndexController.main(IndexController.java:39) Caused by: java.security.InvalidKeyException: Illegal key size at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039) at javax.crypto.Cipher.implInit(Cipher.java:805) at javax.crypto.Cipher.chooseProvider(Cipher.java:864) at javax.crypto.Cipher.init(Cipher.java:1396) at javax.crypto.Cipher.init(Cipher.java:1327) at com.jfinal.kit.AesKit.encrypt(AesKit.java:57) ... 2 more
项目:JFinal