Skip to main content Skip to complementary content

Bank account masking functions

You can mask IBAN and US bank account numbers.

Function Random masking Consistent masking Format-preserving encryption Input data validation
Mask bank code and account number and keep original country No No Yes Yes
Mask account number and keep original country and bank code No No Yes Yes

Which data masking function to use to mask bank account numbers?

An IBAN number is composed of several elements. Here is the terminology used for the data masking functions:
Example of the different elements in French and German IBAN 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.

To mask bank account numbers by other bank account numbers, you can use different data masking functions. To help you decide which function is the most suitable, the following table sums them up.
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.

Information noteNote: To determine if an input is valid, the functions verify different criteria. See the table below.
This table lists the criteria that are verified for each data masking function to determine if an input is valid. The input is validated according to the country code.
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
This table lists the criteria that are verified for each data masking function to make the output valid according to the country code.
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?

The national check digits of the following countries 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
National check digits from other countries are supported but not handled. This means that the functions cannot determine whether the national check digits are conform to the corresponding country or not.

Some countries do not use national check digits.

Mask bank code and account number and keep original country

This function masks IBAN and US bank account numbers. It keeps the original country. As the output depends on different criteria, it may not be a valid bank account number.

This function applies on String values.

Two methods are available: FF1 with AES and FF1 with SHA-2. This function requires no alphabet and no extra parameter.

An IBAN number is composed of several elements. Here is the terminology used for the data masking functions:
Example of the different elements in French and German IBAN 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.

Input account number

An input account number is considered as valid if:
  • The format is conform to the country code,
  • The check digits are valid and
  • The national check digits are valid. This applies to some bank account numbers, see this list. National check digits from other countries are not handled.

Logic of the function

If the input is... Then...
a valid IBAN number the function masks it by an IBAN number from the same country.
a valid US account number the function masks all digits.
Neither a valid IBAN nor US account number and there is: No "Invalid" output flow the function returns null in the main flow.
An "Invalid" output flow the input data are sent to the "Invalid" output flow.

Output account number

The output account number has the same characteristics as the input:
  • The format is conform to the country code,
  • The check digits are valid and
  • The national check digits are valid. This applies to some bank account numbers, 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.

To verify whether the format of an IBAN number is valid or not, you can refer to this IBAN registry.

In the following example, the Keep format check box is selected to preserve the space from the input value.

Input value Method Example of masked value

SV43ACAT00000000000000123123

FF1 with SHA-2

SV94UDJR46506983550548404771

FR49 2867 2609 7580 N16P 4ZFM V39

FF1 with AES null

Cause: Invalid IBAN number

159 753 321 16 FF1 with SHA-2

538 646 897 36

4556156203746391 FF1 with AES null

Cause: Invalid bank account number

RO49 AAaA 1b31 1000 9344 0000 FF1 with SHA-2 null

Cause: Lowercase letters

IT21 Q054 2801 6000 0ABC D12Z E34

FF1 with SHA-2

IT38 B555 0814 456B B218 GN1U X4Z

ST23000200000289355710148

FF1 with AES

ST73378368332371018920239

To unmask the bank account numbers, use tDataUnmasking

.

Mask account number and keep original country and bank code

This function masks IBAN and US bank account numbers. It keeps the original country and bank/branch code. As the output depends on different criteria, it may not be a valid bank account number.

This function applies on String values.

Two methods are available: FF1 with AES and FF1 with SHA-2. This function requires no alphabet and no extra parameter.

An IBAN number is composed of several elements. Here is the terminology used for the data masking functions:
Example of the different elements in French and German IBAN 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.

Input account number

An input account number is considered as valid if:
  • The format is conform to the country code,
  • The check digits are valid and
  • The national check digits are valid. This applies to some bank account numbers, see this list. National check digits from other countries are not handled.

Logic of the function

If the input is... Then...
a valid IBAN number the function masks it by an IBAN number from the same country and keeps the bank/branch code.
a valid US account number the function masks all digits.
Neither a valid IBAN nor US account number and there is: No "Invalid" output flow the function returns null in the main flow.
An "Invalid" output flow the input data are sent to the "Invalid" output flow.

Output account number

The output account number has the same characteristics as the input:
  • The format is conform to the country code,
  • The check digits are valid,
  • The national check digits are valid. This applies to some bank account numbers, see this list. National check digits from other countries are not handled.
  • The bank/branch code is valid if the input one is valid.

To verify whether the format of an IBAN number is valid or not, you can refer to this IBAN registry.

In the following example, the Keep format check box is selected to preserve the space from the input value.

Input value Method Example of masked value

SV43ACAT00000000000000123123

FF1 with SHA-2

SV33ACAT07729582622554750714

FR49 2867 2609 7580 N16P 4ZFM V39

FF1 with AES null

Cause: Invalid IBAN number

159 753 321 16

FF1 with SHA-2

538 646 897 36

4556156203746391

FF1 with AES null

Cause: Invalid bank account number

RO49 AAaA 1b31 1000 9344 0000

FF1 with SHA-2 null

Cause: Lowercase letters

IT21 Q054 2801 6000 0ABC D12Z E34

FF1 with SHA-2

IT17 G054 2801 6001 Q6G7 SY1J 110

ST23000200000289355710148

FF1 with AES

ST44000200002723979196655

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!