报错描述:java.security.InvalidKeyException: Illegal key size 原因分析:JRE中自带的“local_policy.jar ”和“US_export_policy.jar”是支持128位密钥的加密算法,而当我们要使用256位密钥算法的时候,已经超出它的范围,无法支持

解决方案:1、## https://blog.csdn.net/dling8/article/details/84061948 2、升级jdk,比如 java version "1.8.0_74" 升级到 java version "1.8.0_261"

参考链接:https://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters

摘要说明:Make sure you use the latest version of JDK/JRE. In my case, I had put JCE into JRE folder, but it didn't help. It happened because I was running my project from the IDE directly (using JDK). Then I updated my JDK and JRE to the latest version (1.8.0_211) and the problem had gone.