자바에서 AES 256으로 암호화시 다음과 같이 컴파일 에러가 발생한다면..


Exception in thread "main" java.security.InvalidKeyException: Illegal key size
	at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
	at javax.crypto.Cipher.implInit(Cipher.java:790)
	at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
	at javax.crypto.Cipher.init(Cipher.java:1348)
	at javax.crypto.Cipher.init(Cipher.java:1282)
	at net.imcore.AES256Cipher.AES_Encode(AES256Cipher.java:28)
	at net.imcore.Aes256.main(Aes256.java:29)

$JAVA_HOME/jre/lib/security 에 아래의 unlimited strength crypto file을 덮어 쓰면 됩니다.

local_policy.jar US_export_policy.jar