Partial mask
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The partial mask, also known as the custom mask, is only supported for the character data
type. This mask allows the values to be partially masked and enables hiding sensitive
information as well as performing partial authentication of data. For example, a bank
customer care representative may recognize a caller by validating a few characters in
their email address, but the complete email address should not be provided to the
representative. Use the prefix P: to set up the partial mask and define the masking rule
as follows:
|
prefix—Specifies the number of unmasked characters that can be displayed at the beginning of the column value.char[:maxchars]—Specifies a single printable ASCII character to be used to obfuscate the column value. maxChars (optional) specifies the maximum number of characters to mask using the given ASCII character, and the rest of the string is trimmed.[,suffix]—(Optional) specifies the number of characters at the end of the column value that can be displayed unmasked.
The following table lists examples of how to use partial masks and how the masked result is displayed.
| Original value | Mask format | Results | Notes |
|---|---|---|---|
| John Smith | P:1,X
|
JXXXXXXXXX |
|
| MA | P:0,X |
XX
|
|
| John Smith | P:0,*:3 |
*** |
|
| 8881234567 | P:3,0,3 |
8880000567 |
|
| 012345678 | P:0,X,4 |
XXXXX5678 |
|
| my@gmail.com | P:1,*:4,4 |
m****.com |
|
| m@m.com | P:1,*:4,4 |
m**.com |
|
| 012345678 | P:9,X |
012345678 |
|