chore: add another method for base64 util

This commit is contained in:
2024-10-05 19:08:45 +08:00
parent 05efdaebff
commit 4078af7c29
1 file changed
+4
@@ -19,4 +19,8 @@ fun ByteArray.encodeToBase64(): String {
fun String.decodeToString(): String {
return String(Base64.getDecoder().decode(this))
}
fun String.decodeToByteArray(): ByteArray {
return Base64.getDecoder().decode(this)
}