mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -90,7 +90,7 @@ public class SM4 extends SymmetricCrypto{
|
||||
* @param iv 偏移向量,加盐
|
||||
*/
|
||||
public SM4(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));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,7 +137,7 @@ public class SM4 extends SymmetricCrypto{
|
||||
public SM4(String mode, String padding, byte[] key, byte[] iv) {
|
||||
this(mode, padding,//
|
||||
SecureUtil.generateKey(ALGORITHM_NAME, key),//
|
||||
ArrayUtil.isEmpty(iv) ? ((IvParameterSpec) null) : new IvParameterSpec(iv));
|
||||
ArrayUtil.isEmpty(iv) ? null : new IvParameterSpec(iv));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user