Tasks > Masking rules > Key masking
  

Key masking

Key masking produces repeatable results for the same source data.
When you configure a field for key masking, the masking task creates a seed value for the field. The masking task uses the seed to create repeatable masking for the same source field values. Mask date, numeric, and string data types with key masking.

Key string masking

Configure key string masking to mask all or part of a string. To limit the masking output to certain characters, specify a mask format and result string replacement characters. If you need repeatable output, specify a seed value.
The following table describes the parameters that you can use with key masking:
Masking parameter
Description
Repeatable
Returns the same masked value when you run a task multiple times or when you generate masked values for a field that is in multiple tables.
Seed Value
A starting number to create repeatable output. Enter a number from 1 through 999. Default seed value is 190. You can enter the seed value as a parameter.
Mask Format
The type of character to substitute for each character in the source data. You can limit each character to an alphanumeric, numeric, or character type.
Filter Source
Determines whether to skip masking some of the source characters. Configure the Source Filter Type and the Source Filter Chars parameters when you enable this option. Default is disabled.
Source Filter Type
A filter that determines which characters to mask in the source. Use with the Source Filter Chars parameter. You must enable the Filter Source parameter to configure this parameter.
Choose one of the following options:
  • - Mask Only. Mask only the characters that you configure as source filter characters.
  • - Mask All Except. Mask all characters except the characters you configure as source filter characters.
Source Filter Chars
The source characters that you want to mask or the source characters that you want to skip masking. Each character is case-sensitive. Enter the source filter characters with no delimiters. For example, AaBbC.
Filter Target
Determines whether to limit the characters that can appear in the target. Configure the Target Filter Type and the Target Filter Chars parameters when you enable this option. Default is disabled.
Target Filter Type
A filter that determines which characters to use in the target mask. Use with the Target Filter Chars parameter. You must enable the Filter Target parameter to configure this parameter.
Choose one of the following options:
  • - Use Only. Limit the target to the characters that you configure as target filter characters.
  • - Use All Except. Limits the target to all characters except the characters you configure as target filter characters.
Target Filter Chars
The characters that you want to use in a mask or the characters that do not want to use in a mask, based on the values of target filter type. Each character is case-sensitive. Enter the target filter characters with no delimiters. For example, AaBbC.

Mask format

Configure a mask format to limit each character in the output field to an alphabetic, numeric, or alphanumeric character.
If you do not define a mask format, the masking task replaces each source character with any character. If the mask format is longer than the input string, the masking task ignores the extra characters in the mask format. If the mask format is shorter than the source string, the masking task does not mask the characters at the end of the source string.
When you configure mask a mask format, you must configure the source filter characters or target filter characters that you want to use the mask format with.
The following table describes mask format characters:
Character
Description
A
Alphabetical characters. For example, ASCII characters a to z and A to Z.
D
Digits. From 0 through 9.
N
Alphanumeric characters. For example, ASCII characters a to z, A to Z, and 0-9.
X
Any character. For example, alphanumeric or symbol.
+
No masking.
R
Remaining characters. R specifies that the remaining characters in the string can be any character type. R must appear as the last character of the mask.

Source filter characters

Configure source filter characters to choose the characters that you want to mask.
When you set the a character as a source filter character, the character is masked every time it occurs in the source data. The position of the characters in the source string does not matter, and you can configure any number of characters. If you do not configure source filter characters, the masking replaces all the source characters in the field.
The source filter are case sensitive. The masking task does not always return unique data if the number of source string characters is fewer than the number of result string characters.

Target filter characters

Configure target filter characters to limit the characters that can appear in a target column.
Masking replaces characters in the target with the target filter characters. For example, enter the following characters to configure each mask to contain the uppercase alphabetic characters A through F:
ABCDEF
To avoid generating the same output for different input values, configure a wide range of substitute characters, or mask only a few source characters. The position of each character in the string does not matter.

Key numeric masking

You can configure key masking for numeric values and generate deterministic output.
When you configure a field for key numeric masking, you can select a seed value for the field. When the masking task masks the source data, it applies a masking algorithm that requires the seed. You can change the seed value for a field to produce repeatable results if the same source value occurs in a different field.

Key date masking

Key date masking produces repeatable results for the same source date. Date masking always generates valid dates.
You can change the seed value for a field to return repeatable datetime values between the fields.
Key date masking can mask dates between the years 1753 and 9999. If the source year is in a leap year, the masking task returns a year that is also a leap year. If the source month contains 31 days, the masking task returns a month that has 31 days. If the source month is February, the masking task returns February.
When you perform key date masking on Salesforce data, the masking task can insert dates up to 4000. If the masked date value is more than 4000, the masking task fails and throws exception.