Implementation of aes256 encryption in Android

magic_ one hundred and eighty 2021-09-15 09:25:57

AES Encryption is a common encryption method in our work , And in java The corresponding interface has also been implemented in . however Java Self contained JDK Default maximum implementation 128 Bit and below . If you use java Self contained api Realization aes256 Will report java.security.InvalidKeyException:illegal Key Size Error of .


Solution :

If you want to start 256 A key , You need to update local_policy.jar,US_export_policy.jar

If your JAVA_HOME by C:\Program Files\Java\jdk1.6.0_14.

Cover : C:\Program Files\Java\jdk1.6.0_14\jre\lib\security Next file of the same name

Cover : C:\Program Files\Java\jre6\lib\security Next file of the same name

Download address :

java6:

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

java7:

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


Reference code

 Android Realization AES 256 Encryption code

Java Empathy !


quote

Written with  LeoChin.

 
 
 
 
Please bring the original link to reprint ,thank
Similar articles

2021-09-15

2021-09-15

2021-09-15

2021-09-15