maskValue
string maskValue(value, valueType)
string maskValue(value, valueType, maskStyle)
Apply the currently configured data masking context to mask value as a value of type valueType. How the value is masked may be influenced by maskStyle, although a value that requires masking will be masked even if the value of maskStyle is unknown.
A value will be masked when:
- The value of
valueTypeis known and selected in the current context; or - The value of
valueTypeis not known and a value type named "*" is known and selected in the current context.
A value will not be masked when:
- The value of
valueTypeis known and not selected in the current context; or - Neither the value of
valueTypenor a value type named "*" are known in the current context.
Managing selected value types is handled by manipulating the valuetype-set custom profile property. Valid values for this property are defined by the profile and beyond the scope of this document.
| Parameter | Required? | Description |
|---|---|---|
| value | Y | The content to be masked. The entire buffer is assumed to be eligible for masking. |
| valueType | Y | The user- and/or masking profile-defined concept the context represents, such as a password. The value is not required to be known in the current masking context. |
| maskStyle | N | The masking profile-defined masking behavior. Where the default behavior may mask every character of value, alternative behaviors may only mask a subset of characters. The default behavior is applied when omitted, empty, or unrecognized. |