Removed unused IBase64Service

This commit is contained in:
dankito 2020-07-10 16:50:54 +02:00
parent dfba59fd6d
commit d3a9d3ac2a
4 changed files with 0 additions and 55 deletions

View File

@ -167,12 +167,6 @@ class BankingModule(private val applicationContext: Context) {
return JacksonJsonSerializer() return JacksonJsonSerializer()
} }
@Provides
@Singleton
fun provideBase64Service() : IBase64Service {
return Base64ServiceAndroid()
}
@Provides @Provides
@Singleton @Singleton
fun provideAsyncRunner() : IAsyncRunner { fun provideAsyncRunner() : IAsyncRunner {

View File

@ -1,21 +0,0 @@
package net.dankito.banking.ui.javafx.util
import net.dankito.banking.util.IBase64Service
import java.nio.charset.Charset
import java.util.*
// TODO: use version from JavaFxUtils
open class Base64ServiceJava8 : IBase64Service {
override fun encode(text: String, charset: Charset): String {
return Base64.getEncoder().encodeToString(text.toByteArray(charset))
}
override fun decode(base64: String, charset: Charset): String {
val decodedBytes = Base64.getDecoder().decode(base64)
return String(decodedBytes, charset)
}
}

View File

@ -1,12 +0,0 @@
package net.dankito.banking.util
import java.nio.charset.Charset
interface IBase64Service {
fun encode(text: String, charset: Charset): String
fun decode(base64: String, charset: Charset): String
}

View File

@ -1,16 +0,0 @@
package net.dankito.banking.util
import java.nio.charset.Charset
open class UiCommonBase64ServiceWrapper(protected val base64Service: IBase64Service) : net.dankito.banking.fints.util.IBase64Service {
override fun encode(text: String, charset: Charset): String {
return base64Service.encode(text, charset)
}
override fun decode(base64: String, charset: Charset): String {
return base64Service.decode(base64, charset)
}
}