BBAN, example for the internally used format: "11773016-11111018-00000000"
first 3 digits bank code.
next 4 branch code.
the 8th digit is control digit
from 9 to 16 or 24 is bank account.
the 16th or 24th digit is control digit
By debugging I see that the following builders are considered at HU:
String bankCode = "117";
String branchCode = "7301";
String nationalCheckDigit = "6";
String accountNumber = "1111101800000000";
Iban iban = new Iban.Builder()
.countryCode(CountryCode.HU)
.bankCode(bankCode)
.branchCode(branchCode)
.nationalCheckDigit(nationalCheckDigit)
.accountNumber(accountNumber)
.build();
Now this returns the iban number:
HU58117730111111018000000006
But correct generators, also online generators from "11773016-11111018-00000000" will build
HU??117730161111101800000000
So in iban4j the 8th BBAN character, the nationalCheckDigit gets appended to the end, that's why still the IBAN length is right. The nationalCheckDigit is not to be positioned as the last digit. It is the 8th digit in the BBAN format.
BBAN, example for the internally used format: "11773016-11111018-00000000"
By debugging I see that the following builders are considered at HU: String bankCode = "117"; String branchCode = "7301"; String nationalCheckDigit = "6"; String accountNumber = "1111101800000000"; Iban iban = new Iban.Builder() .countryCode(CountryCode.HU) .bankCode(bankCode) .branchCode(branchCode) .nationalCheckDigit(nationalCheckDigit) .accountNumber(accountNumber) .build(); Now this returns the iban number: HU58117730111111018000000006 But correct generators, also online generators from "11773016-11111018-00000000" will build HU??117730161111101800000000 So in iban4j the 8th BBAN character, the nationalCheckDigit gets appended to the end, that's why still the IBAN length is right. The nationalCheckDigit is not to be positioned as the last digit. It is the 8th digit in the BBAN format.