mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user