# Phone masking functions

You can mask French, German, Japanese, UK, and US phone numbers.

| Function | Random masking | Consistent masking | Format-preserving encryption | Input data validation |
| --- | --- | --- | --- | --- |
| Mask French phone number | No | No | Yes | Yes |
| Mask German phone number | No | No | Yes | Yes |
| Mask Japanese phone number | No | No | Yes | Yes |
| Mask UK phone number | No | No | Yes | Yes |
| Mask US phone number | No | No | Yes | Yes |

## Mask French phone number

This function generates a unique random French phone number related to the input.

This function masks the last six digits. Input values that contain at least six digits are regarded as valid phone numbers.

When the input value is not valid, the function returns null.

This function only applies on Strings.

If there are duplicates in the input data, you will get the same duplicates in the masked values. In the same way, if there are no duplicates in the input data, there will be no duplicates in the masked values.

| Option | Description |
| --- | --- |
| Method | The default Basic method uses a proprietary<br>algorithm.<br><br>Information noteNote: As the masking methods are stronger, it is recommended to use the FF1<br>algorithms rather than the Basic method.<br><br>This function can encrypt the output masked<br>values in the same format as the input values, using Format-Preserving Encryption (FPE)<br>methods:<br><br><ul> <li> <span>FF1 with AES</span> relies on the                Advanced Encryption Standard in CBC mode.</li> <li> <span>FF1 with SHA-2</span> relies on the                secure hash function HMAC-256.</li> </ul><br><br>The FPE methods are bijective methods, except when<br>using tweaks.<br><br>The FF1 with<br>AES and FF1 with SHA-2 methods<br>require a password to generate encrypted and repeatable masked values. Those FPE methods<br>do not use a seed.<br><br>You can specify this password in the Password or<br>256-bit key for FF1 methods field, from the Advanced<br>Settings of the component. |
| Extra parameter | This function requires no extra<br>parameter. |

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

| Input value | Method | Example of masked value |
| --- | --- | --- |
| 02 40 99 90 99 | FF1 with AES | 02 40 89 78 01 |

## Mask German phone number

This function generates a unique random German phone number related to the input.

This function masks the last eight digits. Input values that contain at least eight digits are regarded as valid phone numbers.

When the input value is not valid, the function returns null.

This function only applies on Strings.

If there are duplicates in the input data, you will get the same duplicates in the masked values. In the same way, if there are no duplicates in the input data, there will be no duplicates in the masked values.

| Option | Description |
| --- | --- |
| Method | The default Basic method uses a proprietary<br>algorithm.<br><br>Information noteNote: As the masking methods are stronger, it is recommended to use the FF1<br>algorithms rather than the Basic method.<br><br>This function can encrypt the output masked<br>values in the same format as the input values, using Format-Preserving Encryption (FPE)<br>methods:<br><br><ul> <li> <span>FF1 with AES</span> relies on the                Advanced Encryption Standard in CBC mode.</li> <li> <span>FF1 with SHA-2</span> relies on the                secure hash function HMAC-256.</li> </ul><br><br>The FPE methods are bijective methods, except when<br>using tweaks.<br><br>The FF1 with<br>AES and FF1 with SHA-2 methods<br>require a password to generate encrypted and repeatable masked values. Those FPE methods<br>do not use a seed.<br><br>You can specify this password in the Password or<br>256-bit key for FF1 methods field, from the Advanced<br>Settings of the component. |
| Extra parameter | This function requires no extra<br>parameter. |

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

| Input value | Method | Example of masked value |
| --- | --- | --- |
| 636-48018 | FF1 with AES | 389-54922 |

## Mask Japanese phone number

This function generates a unique random Japanese phone number related to the input.

This function masks the last seven digits. Input values that contain at least seven digits are regarded as valid phone numbers.

When the input value is not valid, the function returns null.

This function only applies on Strings.

If there are duplicates in the input data, you will get the same duplicates in the masked values. In the same way, if there are no duplicates in the input data, there will be no duplicates in the masked values.

| Option | Description |
| --- | --- |
| Method | The default Basic method uses a proprietary<br>algorithm.<br><br>Information noteNote: As the masking methods are stronger, it is recommended to use the FF1<br>algorithms rather than the Basic method.<br><br>This function can encrypt the output masked<br>values in the same format as the input values, using Format-Preserving Encryption (FPE)<br>methods:<br><br><ul> <li> <span>FF1 with AES</span> relies on the                Advanced Encryption Standard in CBC mode.</li> <li> <span>FF1 with SHA-2</span> relies on the                secure hash function HMAC-256.</li> </ul><br><br>The FPE methods are bijective methods, except when<br>using tweaks.<br><br>The FF1 with<br>AES and FF1 with SHA-2 methods<br>require a password to generate encrypted and repeatable masked values. Those FPE methods<br>do not use a seed.<br><br>You can specify this password in the Password or<br>256-bit key for FF1 methods field, from the Advanced<br>Settings of the component. |
| Extra parameter | This function requires no extra<br>parameter. |

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

| Input value | Method | Example of masked value |
| --- | --- | --- |
| 052-2451-4455 | FF1 with AES | 052-2970-7735 |

## Mask UK phone number

This function generates a unique random UK phone number related to the input.

This function masks the last seven digits. Input values that contain at least seven digits are regarded as valid phone numbers.

When the input value is not valid, the function returns null.

This function only applies on Strings.

If there are duplicates in the input data, you will get the same duplicates in the masked values. In the same way, if there are no duplicates in the input data, there will be no duplicates in the masked values.

| Option | Description |
| --- | --- |
| Method | The default Basic method uses a proprietary<br>algorithm.<br><br>Information noteNote: As the masking methods are stronger, it is recommended to use the FF1<br>algorithms rather than the Basic method.<br><br>This function can encrypt the output masked<br>values in the same format as the input values, using Format-Preserving Encryption (FPE)<br>methods:<br><br><ul> <li> <span>FF1 with AES</span> relies on the                Advanced Encryption Standard in CBC mode.</li> <li> <span>FF1 with SHA-2</span> relies on the                secure hash function HMAC-256.</li> </ul><br><br>The FPE methods are bijective methods, except when<br>using tweaks.<br><br>The FF1 with<br>AES and FF1 with SHA-2 methods<br>require a password to generate encrypted and repeatable masked values. Those FPE methods<br>do not use a seed.<br><br>You can specify this password in the Password or<br>256-bit key for FF1 methods field, from the Advanced<br>Settings of the component. |
| Extra parameter | This function requires no extra<br>parameter. |

| Input value | Method | Example of masked value |
| --- | --- | --- |
| 02071231234 | FF1 with AES | 02074444306 |

## Mask US phone number

This function generates a unique random US phone number related to the input.

This function masks the last six digits. Input values that contain at least six digits are regarded as valid phone numbers.

When the input value is not valid, the function returns null.

This function only applies on Strings.

If there are duplicates in the input data, you will get the same duplicates in the masked values. In the same way, if there are no duplicates in the input data, there will be no duplicates in the masked values.

| Option | Description |
| --- | --- |
| Method | The default Basic method uses a proprietary<br>algorithm.<br><br>Information noteNote: As the masking methods are stronger, it is recommended to use the FF1<br>algorithms rather than the Basic method.<br><br>This function can encrypt the output masked<br>values in the same format as the input values, using Format-Preserving Encryption (FPE)<br>methods:<br><br><ul> <li> <span>FF1 with AES</span> relies on the                Advanced Encryption Standard in CBC mode.</li> <li> <span>FF1 with SHA-2</span> relies on the                secure hash function HMAC-256.</li> </ul><br><br>The FPE methods are bijective methods, except when<br>using tweaks.<br><br>The FF1 with<br>AES and FF1 with SHA-2 methods<br>require a password to generate encrypted and repeatable masked values. Those FPE methods<br>do not use a seed.<br><br>You can specify this password in the Password or<br>256-bit key for FF1 methods field, from the Advanced<br>Settings of the component. |
| Extra parameter | This function requires no extra<br>parameter. |

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

| Input value | Method | Example of masked value |
| --- | --- | --- |
| 636-48018 | FF1 with AES | 389-54922 |