Bank account generation functions
You can generate bank account numbers.
To mask bank account numbers by keeping the original country, the bank/branch code and using the Format-Preserving Encryption, use the Bank account masking functions.
Function | Random generation | Consistent generation | Bijective generation | Input data validation |
---|---|---|---|---|
Generate account number | Yes | No | No | No |
Generate account number and keep original country | Yes | No | No | No |
Which data masking function to use to mask bank account numbers?
- 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
country.
Some countries do not use national check digits.
Function | Generate account number and keep original country | Mask bank code and account number and keep original country | Mask account number and keep original country and bank code | |
---|---|---|---|---|
Behavior |
Input valid: Generates bank account numbers conform to the corresponding country. Input not valid: Generates French IBAN numbers. |
Uses the format-preserving encryption. Input valid: Masks the bank account number. Input not valid: Sends the input data to the "Invalid" flow or returns null in the main flow. |
Uses the format-preserving encryption. Input valid: Masks the bank account number and keeps the bank/branch code. Input not valid: Sends the input data to the "Invalid" flow or returns null in the main flow. |
Input validation | Generate account number and keep original country | Mask bank code and account number and keep original country | Mask account number and keep original country and bank code |
---|---|---|---|
Validate country code | Yes | Yes | Yes |
Validate format | No | Yes | Yes |
Validate IBAN check digits | No | Yes | Yes |
Validate national check digits | No | Yes Only for some countries (see the list below). For the other countries, the national check digits may not be valid. |
Yes Only for some countries (see the list below). For the other countries, the national check digits may not be valid. |
Validate bank/branch code | No | No | No |
Output validity | Generate account number and keep original country | Mask bank code and account number and keep original country | Mask account number and keep original country and bank code |
---|---|---|---|
Validate country code | Yes | Yes | Yes |
Validate format | Yes | Yes | Yes |
Validate IBAN check digits | Yes | Yes | Yes |
Validate national check digits | Yes Only for some countries (see the list below). For the other countries, the national check digits may not be valid. |
Yes Only for some countries (see the list below). For the other countries, the national check digits may not be valid. |
Yes Only for some countries (see the list below). For the other countries, the national check digits may not be valid. |
Validate bank/branch code | No | No | Yes When the input bank/branch code is valid. |
Which national check digits are handled?
- Belgium
- Bosnia
- Croatia
- Czech Republic
- Estonia
- France
- Hungary
- Italy
- Mauritania
- Monaco
- Montenegro
- Norway
- Portugal
- San Marino
- Serbia
- Slovakia
- Slovenia
- Spain
- Timor-Leste
- Tunisia
Some countries do not use national check digits.
Generate account number
This function generates a French IBAN number. As the output depends on different criteria, it may not be a valid bank account number.
This function only applies on String values. This function requires no extra parameter.
- Black: Country code
- Coral: Check digits
- Light blue: Bank/branch code
- Dark blue: Account number
- Gray: National check digits
The bank/branch code and account number are randomly generated.
The check digits and national check digits are generated using algorithms to meet the French IBAN standards.
In the following example, the masked value is a French IBAN number, regardless of the input value.
Input value | Example of a masked value |
---|---|
A26 | FR76 3000 6000 0112 3456 7890 189 |
Generate account number and keep original country
- 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
country.
Some countries do not use national check digits.
Input account number
To determine the original country, the function analyzes the first two characters. For example, if the first two characters are SE, the output will be a Swedish bank account number.
As the function only analyzes the first two characters, it is not required to have a bank account number as a input. See the first example.
Logic of the function
When 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 some countries, the national check digits are also conform to the country. To know which national check digits are handled, see this list.
National check digits from other countries are not handled.
As the bank/branch code is randomly generated, it may not be valid.
Here are two examples:
Input value | Example of a masked value |
---|---|
BE | BE78496464962486 |
091000019 6564833713 | 091000019 3602742991 |
In the first example, the two characters correspond to the country code of Belgium, the masked value is a valid Belgian IBAN number.
In the second example, the input value is a valid US account number, the masked value is a valid US account number.