java.security.NoSuchAlgorithmException: Cannot find any provider supporting AES/ECB/PKCS7Padding
Default JDK supports encryption only through 128 bit keys becuase of American restrictions. So to support encryption from 256 bit long key we have to replace local_policy.jar and US_export_policy.jars in $JAVA_HOME/java-8-oracle/jre/lib/security folder otherwise it will give java.security.InvalidKeyException: Illegal key size or default
http://blog.csdn.net/dywailly/article/details/46861777
http://blog.csdn.net/l1028386804/article/details/42706039
https://www.jianshu.com/p/733c6da85422
http://www.bouncycastle.org/specifications.html
一.解决 Cannot find any provider supporting AES/ECB/PKCS7PADDING 的问题.
1.在Android端的不必修改.Android一点问题都没有
2.将服务端的加密工具类的 AES/ECB/PKCS7PADDING 改成 AES/ECB/PKCS5PADDING
二.解决EncryptionException:java.security.InvalidKeyException:Illegal key size 问题
1.下载 Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy 包