![](https://yulaiz.com/wp-content/uploads/2018/03/jdk-aes-Illegal-key-size-banner.jpg)
AES加密出现 java.security.InvalidKeyException: Illegal key size or default parameters
1. 现象
在使用AES加密会出现错误:
代码:
public static String encrypt(String sSrc, String sKey) throws Exception {
SecretKeySpec skeySpec = new SecretKeySpec[......]
在使用AES加密会出现错误:
代码:
public static String encrypt(String sSrc, String sKey) throws Exception {
SecretKeySpec skeySpec = new SecretKeySpec[......]