Error description: java.security.InvalidKeyException: Illegal ke

Error description : java.security.InvalidKeyException: Illegal key size
Reason analysis : The "local_policy.jar" and "US_export_policy.jar" that come with JRE are encryption algorithms that support 128-bit keys, and when we want to use 256-bit keys The algorithm is beyond its scope and cannot be supported

Solution : 1. ## https://blog.csdn.net/dling8/article/details/84061948
2. Upgrade jdk, such as java version "1.8.0_74" upgrade to java version "1.8.0_261"

Reference link : 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.

Guess you like

Origin blog.51cto.com/11114389/2550297