Merge pull request #466 from gedoor/master

update
pull/481/head
Antecer 4 years ago committed by GitHub
commit f0a8dbbd46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/src/main/assets/updateLog.md
  2. 6
      app/src/main/java/io/legado/app/utils/EncoderUtils.kt

@ -10,7 +10,7 @@
* 替换编辑界面添加正则学习教程
* 去除解析目录时拼接相对url,提升解析速度
* 自动分段优化 by [tumuyan](https://github.com/tumuyan)
* web支持图片显示
* web支持图片显示 by [六月](https://github.com/Celeter)
**2020/11/01**
* 导入本地添加智能扫描,菜单-智能扫描,扫描当前文件夹包括子文件夹下所有文件

@ -25,8 +25,9 @@ object EncoderUtils {
return tmp.toString()
}
fun base64Decode(str: String): String {
val bytes = Base64.decode(str, Base64.DEFAULT)
@JvmOverloads
fun base64Decode(str: String, flags: Int = Base64.DEFAULT): String {
val bytes = Base64.decode(str, flags)
return try {
String(bytes, StandardCharsets.UTF_8)
} catch (e: Exception) {
@ -34,6 +35,7 @@ object EncoderUtils {
}
}
@JvmOverloads
fun base64Encode(str: String, flags: Int = Base64.NO_WRAP): String? {
return Base64.encodeToString(str.toByteArray(), flags)
}

Loading…
Cancel
Save