Removed unused IBase64Service
This commit is contained in:
parent
dfba59fd6d
commit
d3a9d3ac2a
|
@ -167,12 +167,6 @@ class BankingModule(private val applicationContext: Context) {
|
|||
return JacksonJsonSerializer()
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideBase64Service() : IBase64Service {
|
||||
return Base64ServiceAndroid()
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideAsyncRunner() : IAsyncRunner {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
|
@ -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
|
||||
|
||||
}
|
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue