Skip to content

Commit

Permalink
fixed image en/de-coding
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Apr 20, 2023
1 parent 35ba808 commit 77c70ea
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/commonMain/assets/aboutlibraries.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ actual fun String.decodeBase64(): ByteArray {
actual fun String.encodeBase64(): String {
return Base64.encodeToString(this.toByteArray(), Base64.DEFAULT)
}

actual fun ByteArray.encodeBase64(): String {
return Base64.encodeToString(this, Base64.DEFAULT)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ package dev.datlag.burningseries.model.common
expect fun String.decodeBase64(): ByteArray
expect fun String.encodeBase64(): String

fun ByteArray.encodeBase64(): String {
return this.decodeToString().encodeBase64()
}
expect fun ByteArray.encodeBase64(): String
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ actual fun String.decodeBase64(): ByteArray {
actual fun String.encodeBase64(): String {
return String()
}

actual fun ByteArray.encodeBase64(): String {
return String()
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ actual fun String.decodeBase64(): ByteArray {
actual fun String.encodeBase64(): String {
return Base64.getEncoder().encodeToString(this.toByteArray())
}

actual fun ByteArray.encodeBase64(): String {
return Base64.getEncoder().encodeToString(this)
}

0 comments on commit 77c70ea

Please sign in to comment.