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 c9919130..8b93b894 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt @@ -16,14 +16,14 @@ import java.util.concurrent.ThreadLocalRandom /** * Takes the Segments of they payload, may signs and encrypts them, calculates message size, - * adds the message header and closing, and formats the whole message to string. + * adds the message header and ending, and formats the whole message to string. */ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = SegmentNumberGenerator(), protected val utils: FinTsUtils = FinTsUtils()) { companion object { const val MessageHeaderLength = 30 - const val MessageClosingLength = 11 + const val MessageEndingLength = 11 const val AddedSeparatorsLength = 3 } @@ -90,13 +90,13 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg val formattedPayload = formatPayload(payload) - val messageSize = formattedPayload.length + MessageHeaderLength + MessageClosingLength + AddedSeparatorsLength + val messageSize = formattedPayload.length + MessageHeaderLength + MessageEndingLength + AddedSeparatorsLength val header = Nachrichtenkopf(ISegmentNumberGenerator.FirstSegmentNumber, messageSize, dialogData) - val closing = Nachrichtenabschluss(generator.getNextSegmentNumber(), dialogData) + val ending = Nachrichtenabschluss(generator.getNextSegmentNumber(), dialogData) - return listOf(header.format(), formattedPayload, closing.format()) + return listOf(header.format(), formattedPayload, ending.format()) .joinToString(Separators.SegmentSeparator, postfix = Separators.SegmentSeparator) } @@ -114,13 +114,13 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg time ) - val signatureClosing = Signaturabschluss( + val signatureEnding = Signaturabschluss( generator.getNextSegmentNumber(), controlReference, customer.pin ) - return listOf(signatureHeader, *payloadSegments.toTypedArray(), signatureClosing) + return listOf(signatureHeader, *payloadSegments.toTypedArray(), signatureEnding) } diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/SegmentId.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/SegmentId.kt index ddabe623..5a9d1838 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/SegmentId.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/SegmentId.kt @@ -5,7 +5,7 @@ enum class SegmentId(val id: String) { MessageHeader("HNHBK"), - MessageClosing("HNHBS"), + MessageEnding("HNHBS"), EncryptionHeader("HNVSK"), @@ -13,7 +13,7 @@ enum class SegmentId(val id: String) { SignatureHeader("HNSHK"), - SignatureClosing("HNSHA"), + SignatureEnding("HNSHA"), DialogEnd("HKEND"), diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/Nachrichtenabschluss.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/Nachrichtenabschluss.kt index 5330c0a2..b448535a 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/Nachrichtenabschluss.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/Nachrichtenabschluss.kt @@ -16,6 +16,6 @@ open class Nachrichtenabschluss( dialogData: DialogData ) : Segment(listOf( - Segmentkopf(SegmentId.MessageClosing, 1, segmentNumber), + Segmentkopf(SegmentId.MessageEnding, 1, segmentNumber), Nachrichtennummer(dialogData.messageNumber) ), Existenzstatus.Mandatory) \ No newline at end of file diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/Signaturabschluss.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/Signaturabschluss.kt index cadd7027..c4d42966 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/Signaturabschluss.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/Signaturabschluss.kt @@ -19,7 +19,7 @@ open class Signaturabschluss( pinOrTan: String ) : Segment(listOf( - Segmentkopf(SegmentId.SignatureClosing, 2, segmentNumber), + Segmentkopf(SegmentId.SignatureEnding, 2, segmentNumber), Sicherheitskontrollreferenz(securityControlReference), // has to be the same as in Signaturkopf NotAllowedDatenelement(), // only used for HBCI, not allowed for PIN/TAN BenutzerdefinierteSignatur(pinOrTan)