diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt index 984533a9..1cf9dcc3 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt @@ -28,8 +28,6 @@ open class ResponseParser( ) { companion object { - val EncryptionDataSegmentHeaderRegex = Regex("${MessageSegmentId.EncryptionData.id}:\\d{1,3}:\\d{1,3}\\+") - val JobParametersSegmentRegex = Regex("HI[A-Z]{3}S") const val FeedbackParametersSeparator = "; " diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/MessageUtils.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/MessageUtils.kt index 14cece93..285ccb3f 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/MessageUtils.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/MessageUtils.kt @@ -8,6 +8,8 @@ open class MessageUtils { companion object { val BinaryDataHeaderPattern = Regex("@\\d+@") + + val EncryptionDataSegmentHeaderRegex = Regex("${MessageSegmentId.EncryptionData.id}:\\d{1,3}:\\d{1,3}\\+") } @@ -40,7 +42,7 @@ open class MessageUtils { if (binaryDataHeaderStartIndex > 15) { - ResponseParser.EncryptionDataSegmentHeaderRegex.find(dataString, binaryDataHeaderStartIndex - 15)?.let { matchResult -> + EncryptionDataSegmentHeaderRegex.find(dataString, binaryDataHeaderStartIndex - 15)?.let { matchResult -> return matchResult.range.start < binaryDataHeaderStartIndex } }