mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix code
This commit is contained in:
parent
b5bc213a63
commit
6accf8fca0
@ -38,6 +38,7 @@ import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 安全相关工具类<br>
|
||||
@ -524,6 +525,9 @@ public class SecureUtil {
|
||||
* @since 4.3.3
|
||||
*/
|
||||
public static byte[] decode(final String key) {
|
||||
if(Objects.isNull(key)){
|
||||
return null;
|
||||
}
|
||||
return Validator.isHex(key) ? HexUtil.decodeHex(key) : Base64.decode(key);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user