티스토리 뷰
java.security.InvalidKeyException: Illegal key size with AES256
Jared 2017. 6. 7. 11:42By default Java supports only 128-bit encryption and you need to download and install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files to support 256-bit AES encryption.
Here are the steps to fix java.security.InvalidKeyException: Illegal key size exception:
1. Visit Oracle’s website and put ‘Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files’ in the search box. Here is the link to download.
Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
2. Download the zip file with installed your java version and extract it on your drive.
3. From the extracted folder, you will find local_policy.jar and US_export_policy.jar files.
4. Go to your Java installation directory (aka JAVA_HOME) and find : JAVA_HOME/jre{version_number}/lib/security. Files with the same names will most probably be there already. You need to replace them with the new files.
5. Refresh project and you can now restart your project and use 256-AES, 512-AES and so on.
- Total
- Today
- Yesterday
- ssh
- spring
- monitoring
- spring boot
- docker
- log4j
- zookeeper
- jboss
- SMPP
- Dependency
- Shell
- dump
- JSF
- Java
- Maven
- Kubernetes
- Heap
- Guava
- Oracle
- svn
- bouncycastle
- nodejs
- OOP
- bash
- ubuntu
- EMV
- SBM
- Tomcat
- Jose
- install
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |