chore: add another method for base64 util
This commit is contained in:
1 file changed
+4
@@ -19,4 +19,8 @@ fun ByteArray.encodeToBase64(): String {
|
|||||||
|
|
||||||
fun String.decodeToString(): String {
|
fun String.decodeToString(): String {
|
||||||
return String(Base64.getDecoder().decode(this))
|
return String(Base64.getDecoder().decode(this))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun String.decodeToByteArray(): ByteArray {
|
||||||
|
return Base64.getDecoder().decode(this)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user