Credit Card masking functions
Function | Random masking | Consistent masking | Format-preserving encryption | Input data validation |
---|---|---|---|---|
Mask Credit Card and keep bank | No | No | Yes | Yes |
Mask Credit Card | No | No | Yes | Yes |
- Apply on String values.
- Support all credit card types.
- Keep the original format of the credit card number. For example, if the input has 13 digits, the output has 13 digits.
A credit card number is considered invalid when it does not satisfy the Luhn algorithm.
- No "Invalid" output flow, the function returns null in the main flow.
- An "Invalid" output flow, the corresponding data are sent to the "Invalid" output flow.
Mask Credit Card and keep bank
- Keeps the first six digits.
- Masks the other digits.
- Generates the last digit using the Luhn algorithm.
Two methods are available: FF1 with AES and FF1 with SHA-2. This function requires no alphabet and no extra parameter.
In the following example, the Keep format check box is selected to preserve the space from the input value.
Credit card number | Method | Example of masked value |
---|---|---|
4570 5624 6978 6793 |
FF1 with AES |
4570 5678 2786 4430 |
374140537770721 |
FF1 with AES |
374140100455098 |
5168690988613241 |
FF1 with SHA-2 |
5168699616108078 |
5158495805899854 |
FF1 with SHA-2 |
5158494455420285 |
0123 4567 8987 6543 210 | FF1 with AES | null |
Mask Credit Card
- Masks all digits.
- Generates the last digit using the Luhn algorithm.
Two methods are available: FF1 with AES and FF1 with SHA-2. This function requires no alphabet and no extra parameter.
In the following example, the Keep format check box is selected to preserve the space from the input value.
Credit card number | Method | Example of masked value |
---|---|---|
4570 5624 6978 6793 |
FF1 with AES |
4931 3744 4754 2072 |
374140537770721 |
FF1 with AES |
749381687018333 |
5168690988613241 |
FF1 with SHA-2 |
4138106541683084 |
5158495805899854 |
FF1 with SHA-2 |
9641013768742255 |
0123 4567 8987 6543 210 | FF1 with AES | null |