This is a Java implementation of UK Bank Account Modulus Checking. Modulus Checking is a process used to determine if a given account number could be valid for a given sort code.
Receiving a valid modulus check result only means that the Sort Code and Account Number pair could exist not that they do!
The algorithms, test cases and reference data can be found on the vocalink website. That site should be considered the authoritative source for the modulus checking algorithm and weighting data.
Get more details at codescene.io.
String sortCode = "012345";
String accountNumber = "12345678";
ModulusChecker modulusChecker = new ModulusChecker();
var result = modulusChecker
.checkBankAccount(sortCode,accountNumber);
This software is released under the MIT license.
NB the resource text files valacdos.txt and scsubtab.txt are produced and released by Vocalink not me
Current version: v0.1.0 uses v4.8 of Vocalink Modulus Checking copied from their site on 2018-03-23
- version: v1.1.0 switches to version v5.0 of Vocalink spec
- version: v1.0.0 switched to kotlin from Java
- version: v0.1.0 uses v4.8 of Vocalink
- version: v0.0.0 uses v4.0 of Vocalink Modulus Checking copied from their site on 2017-01-04