非对称加解密
This commit is contained in:
@@ -15,6 +15,9 @@ public abstract class CodecUtils {
|
||||
}
|
||||
|
||||
public static byte[] decodeBase64(String str) {
|
||||
if (str == null || str.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Base64.getDecoder().decode(str);
|
||||
} catch (Exception var3) {
|
||||
@@ -35,6 +38,9 @@ public abstract class CodecUtils {
|
||||
}
|
||||
|
||||
public static byte[] decodeHex(String str) {
|
||||
if (str == null || str.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Hex.decode(str);
|
||||
} catch (Exception var3) {
|
||||
|
||||
Reference in New Issue
Block a user