mirror of
https://github.com/2dust/v2rayNG.git
synced 2026-11-03 19:54:30 +00:00
Fix base64-url-safe format decode
This commit is contained in:
1 parent
962519854d
commit
78fe4e4bc4
1 file changed
+7
-2
@@ -102,9 +102,14 @@ object Utils {
|
||||
try {
|
||||
return Base64.decode(text, Base64.NO_WRAP).toString(charset("UTF-8"))
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
return ""
|
||||
Log.i(AppConfig.ANG_PACKAGE, "Parse base64 standard failed $e")
|
||||
}
|
||||
try {
|
||||
return Base64.decode(text, Base64.NO_WRAP.or(Base64.URL_SAFE)).toString(charset("UTF-8"))
|
||||
} catch (e: Exception) {
|
||||
Log.i(AppConfig.ANG_PACKAGE, "Parse base64 url safe failed $e")
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user