From d90ec3a8884b261ae3a730ed6e32ae1265d353f7 Mon Sep 17 00:00:00 2001 From: dankl Date: Sat, 5 Oct 2019 16:40:55 +0200 Subject: [PATCH] Implemented generating a control reference --- .../main/kotlin/net/dankito/fints/messages/MessageBuilder.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt index 4228ec86..64e75856 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt @@ -11,6 +11,7 @@ import net.dankito.fints.model.CustomerData import net.dankito.fints.model.DialogData import net.dankito.fints.model.ProductData import net.dankito.fints.util.FinTsUtils +import java.util.concurrent.ThreadLocalRandom /** @@ -89,7 +90,7 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg protected open fun signPayload(headerSegmentNumber: Int, bank: BankData, customer: CustomerData, date: Int, time: Int, payloadSegments: List): List { - val controlReference = "1" // TODO + val controlReference = Math.abs(ThreadLocalRandom.current().nextInt()).toString() val signatureHeader = PinTanSignaturkopf( headerSegmentNumber,