Replaced deprecated methods
This commit is contained in:
parent
5d7ea48a46
commit
34e40aeee1
|
@ -184,7 +184,7 @@ open class ModelMapper(
|
||||||
val methodName = parameters.methodName
|
val methodName = parameters.methodName
|
||||||
|
|
||||||
// we filter out iTAN and Einschritt-Verfahren as they are not permitted anymore according to PSD2
|
// we filter out iTAN and Einschritt-Verfahren as they are not permitted anymore according to PSD2
|
||||||
if (methodName.toLowerCase() == "itan") {
|
if (methodName.lowercase() == "itan") {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ open class ModelMapper(
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open fun mapToTanMethodType(parameters: TanMethodParameters): TanMethodType? {
|
protected open fun mapToTanMethodType(parameters: TanMethodParameters): TanMethodType? {
|
||||||
val name = parameters.methodName.toLowerCase()
|
val name = parameters.methodName.lowercase()
|
||||||
|
|
||||||
return when {
|
return when {
|
||||||
// names are like 'chipTAN (comfort) manuell', 'Smart(-)TAN plus (manuell)' and
|
// names are like 'chipTAN (comfort) manuell', 'Smart(-)TAN plus (manuell)' and
|
||||||
|
@ -254,7 +254,7 @@ open class ModelMapper(
|
||||||
|
|
||||||
protected open fun tanMethodNameContains(name: String, vararg namesToTest: String): Boolean {
|
protected open fun tanMethodNameContains(name: String, vararg namesToTest: String): Boolean {
|
||||||
namesToTest.forEach { nameToTest ->
|
namesToTest.forEach { nameToTest ->
|
||||||
if (name.contains(nameToTest.toLowerCase())) {
|
if (name.contains(nameToTest.lowercase())) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
@file:Suppress("UNCHECKED_CAST")
|
||||||
|
|
||||||
package net.codinux.banking.fints.response
|
package net.codinux.banking.fints.response
|
||||||
|
|
||||||
import net.codinux.banking.fints.messages.MessageBuilderResult
|
import net.codinux.banking.fints.messages.MessageBuilderResult
|
||||||
|
|
|
@ -498,7 +498,7 @@ open class ResponseParser(
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val lowerCaseMayDkTanMethod = mayDkTanMethod.toLowerCase()
|
val lowerCaseMayDkTanMethod = mayDkTanMethod.lowercase()
|
||||||
|
|
||||||
if (lowerCaseMayDkTanMethod == "mobiletan" || lowerCaseMayDkTanMethod == "mtan") {
|
if (lowerCaseMayDkTanMethod == "mobiletan" || lowerCaseMayDkTanMethod == "mtan") {
|
||||||
return DkTanMethod.mobileTAN
|
return DkTanMethod.mobileTAN
|
||||||
|
|
|
@ -84,7 +84,7 @@ open class FlickerCodeDecoder {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encoding == FlickerCodeEncoding.ASCII) {
|
if (encoding == FlickerCodeEncoding.ASCII) {
|
||||||
data = data.map { toHex(it.toInt(), 2) }.joinToString("")
|
data = data.map { toHex(it.code, 2) }.joinToString("")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encoding == FlickerCodeEncoding.BCD && data.length % 2 != 0) {
|
if (encoding == FlickerCodeEncoding.BCD && data.length % 2 != 0) {
|
||||||
|
@ -193,7 +193,7 @@ open class FlickerCodeDecoder {
|
||||||
|
|
||||||
|
|
||||||
protected open fun toHex(number: Int, minLength: Int): String {
|
protected open fun toHex(number: Int, minLength: Int): String {
|
||||||
var result = number.toString (16).toUpperCase()
|
var result = number.toString (16).uppercase()
|
||||||
|
|
||||||
while (result.length < minLength) {
|
while (result.length < minLength) {
|
||||||
result = '0' + result
|
result = '0' + result
|
||||||
|
|
|
@ -37,9 +37,9 @@ open class Base64 {
|
||||||
|
|
||||||
(string.indices step 3).forEach { index ->
|
(string.indices step 3).forEach { index ->
|
||||||
val number: Int =
|
val number: Int =
|
||||||
(0xFF.and(string[index ].toInt()) shl 16) +
|
(0xFF.and(string[index ].code) shl 16) +
|
||||||
(0xFF.and(string[index + 1].toInt()) shl 8) +
|
(0xFF.and(string[index + 1].code) shl 8) +
|
||||||
0xFF.and(string[index + 2].toInt())
|
0xFF.and(string[index + 2].code)
|
||||||
|
|
||||||
encoded.append(Base64Chars[(number shr 18) and 0x3F])
|
encoded.append(Base64Chars[(number shr 18) and 0x3F])
|
||||||
encoded.append(Base64Chars[(number shr 12) and 0x3F])
|
encoded.append(Base64Chars[(number shr 12) and 0x3F])
|
||||||
|
|
Loading…
Reference in New Issue