AES256 support

Error message:
Caused by: java.security.InvalidKeyException: Illegal Key size or default the Parameters
cause of the problem:

Java almost all kinds of commonly used encryption algorithms can be found in the corresponding implementation.
Since the United States export restrictions, Sun made a corresponding limit by file permissions (local_policy.jar, US_export_policy.jar). Therefore there are some problems:
not meet the demand on the ● key length (eg: java.security.InvalidKeyException: Illegal Key Parameters size or default);
● unable to support part of the algorithm, such as MD4, SHA-224 algorithms;
● use the API not very convenient; some common base for the conversion aid failed to provide, such as Base64 encoding conversion, hexadecimal code conversion tools.
Oracle provides no policy limiting access to the file (Unlimited Strength Jurisdiction Policy Files) on its official website, we only need to deploy the JRE environment, you can work around the limitation.

Solution:

http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters

JDK8 jar package Download:

http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

JDK7 jar package Download:

http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html


JDK6 jar package Download:

http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html

 

The inside of the jar two packages: local_policy.jar and US_export_policy.jar replace the original jdk installation directory C: \ Program Files \ Java \ jre6 \ lib \ jar package under the two security can pick up

Guess you like

Origin www.cnblogs.com/bigjor/p/11759938.html