티스토리 뷰

By 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
«   2025/05   »
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
글 보관함