# Replace all

This function masks all characters from the input values.

This function can be used on Strings.

When using the FF1 with AES and FF1 with SHA-2 methods, the input values must contain at least two characters to mask. Otherwise, the function returns null.

| Option | Description |
| --- | --- |
| Method | The Randomly method randomly selects a character. As a<br>result, two identical input values can be masked with the different output<br>values.<br><br>When the same value appears twice in the input data, the<br>Consistently method ensures that the function outputs<br>the same masked value in the same Job execution.<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 | The optional extra parameter must be a character. |

The following table shows examples of masked values depending on the input value, the method, and the extra parameter.

| Input value | Method | Alphabet | Extra parameter | Example of a masked value | Details |
| --- | --- | --- | --- | --- | --- |
| Jack | Randomly | - | "a" | aaaa | All characters are replaced with the character defined as an extra<br>parameter. |
| S1000D | Randomly | - | "4" | 444444 | All characters are replaced with the character defined as an extra<br>parameter. |
| S1000D | FF1 with SHA-2 | Best guess | - | 2MTW72 | The masked value contains characters from all alphabets represented in the<br>input value. |