mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add UrlDecoder
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
package cn.hutool.crypto.symmetric;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.Mode;
|
||||
import cn.hutool.crypto.Padding;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
|
||||
/**
|
||||
* AES加密算法实现<br>
|
||||
* 高级加密标准(英语:Advanced Encryption Standard,缩写:AES),在密码学中又称Rijndael加密法<br>
|
||||
@@ -105,7 +105,7 @@ public class AES extends SymmetricCrypto {
|
||||
* @since 4.6.7
|
||||
*/
|
||||
public AES(Mode mode, Padding padding, SecretKey key, byte[] iv) {
|
||||
this(mode, padding, key, ArrayUtil.isEmpty(iv) ? ((IvParameterSpec) null) : new IvParameterSpec(iv));
|
||||
this(mode, padding, key, ArrayUtil.isEmpty(iv) ? null : new IvParameterSpec(iv));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,7 +153,7 @@ public class AES extends SymmetricCrypto {
|
||||
public AES(String mode, String padding, byte[] key, byte[] iv) {
|
||||
this(mode, padding,//
|
||||
SecureUtil.generateKey(SymmetricAlgorithm.AES.getValue(), key),//
|
||||
ArrayUtil.isEmpty(iv) ? ((IvParameterSpec) null) : new IvParameterSpec(iv));
|
||||
ArrayUtil.isEmpty(iv) ? null : new IvParameterSpec(iv));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user