(SecretKey key, byte[] iv, byte[] data)
| 305 | |
| 306 | // 使用AES加密数据(CBC模式需要提供IV,带padding) |
| 307 | public static byte[] encryptAes(SecretKey key, byte[] iv, byte[] data) throws GeneralSecurityException { |
| 308 | return encryptAes(key, iv, data, 0, data.length); |
| 309 | } |
| 310 | |
| 311 | // 使用AES加密数据(CBC模式需要提供IV,带padding) |
| 312 | public static byte[] encryptAes(SecretKey key, byte[] iv, byte[] data, int offset, int size) |