Skip to main content Skip to complementary content

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:
  • 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 the 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 the 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!