GeXiangDong

精通Java、SQL、Spring的拼写,擅长Linux、Windows的开关机

0%

java aes 256 java.security.InvalidKeyException: Illegal key size after installation the policy

遇到的问题

Java Exception :
java aes 256 java.security.InvalidKeyException: Illegal key size after installation the policy

解决方法

这是由于jdk里不包含256位加密算法导致的

  1. download JCE at http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
  2. unzip and copy two jars to JAVA_HOME/jre/lib/security and override the old ones.
  3. restart tomcat