An IBAN number is composed of several elements. Here is the terminology used for the data masking functions:
- Black: Country code
- Coral: Check digits
- Light blue: Bank/branch code
- Dark blue: Account number
- Gray: National check digits. Their position in the IBAN number depends on the
Some countries do not use national check digits.
Input account number
An input account number is considered as valid if its length corresponds to the length of an account number of the country. The country is verified using the first two characters.
Logic of the function
|If the input is...||Then...|
|a valid IBAN number||the function generates an IBAN number from the same country as the input value.|
|a valid US account number||the function keeps the first nine digits and randomly masks the other digits.|
|not a valid account number||the function generates a French IBAN number.|
Output account number
The format and the check digits of the generated account number are conform to the corresponding country.
For French and Monegasque IBAN numbers, the national check digits are also conform to the country. National check digits from other countries are not handled.As the bank/branch code is randomly generated, it may not be valid.
|Input value||Example of a masked value|
|1234567890||FR76 3000 1007 9412 3456 7890 185|
|091000019 6564833713||091000019 3602742991|
In the first example, the input value is not a valid account number, the masked value is a valid French IBAN number.
In the second example, the input value is a valid US account number, the masked value is a valid US account number.