mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
9b16947508
commit
b1920b6fa2
@ -217,7 +217,7 @@ public class Base64 {
|
||||
* @since 5.7.2
|
||||
*/
|
||||
public static String encodeStr(byte[] arr, boolean isMultiLine, boolean isUrlSafe) {
|
||||
return Base64Encoder.encodeStr(arr, isMultiLine, isUrlSafe);
|
||||
return StrUtil.str(encode(arr, isMultiLine, isUrlSafe), DEFAULT_CHARSET);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,7 +163,8 @@ public class HMac implements Serializable {
|
||||
* @return 摘要
|
||||
*/
|
||||
public String digestBase64(String data, Charset charset, boolean isUrlSafe) {
|
||||
return Base64.encodeStr(digest(data, charset), false, isUrlSafe);
|
||||
final byte[] digest = digest(data, charset);
|
||||
return isUrlSafe ? Base64.encodeUrlSafe(digest) : Base64.encode(digest);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user