createMaskingFormat()
createMaskingFormat() creates new masking formats which can be used with the get() methods to mask the plaintext values.
Syntax
public int createMaskingFormat(int showFirst, int showLast, String maskChar)
Request Parameters
Parameters | Data Types | Descriptions |
---|---|---|
showFirst | string | The number of characters to be displayed at the beginning of the value. |
showLast | string | The number of characters to be displayed at the end of the value. |
maskChar | string | A single character (except blank space) that will be used as masking character for the remaining characters of the value. The default masking character is X. |
Returned Values
Returns integer as the new masking format ID. This value is greater than 100.
Exception
Passes an exception if the following parameters are invalid:
showFirst
showLast
maskChar
Example
createMaskingFormat(3 2,"#")
The plaintext value 1234567890 is masked as 123#####90. In this method, the first parameter allows showing first three values, the second parameter allows showing the last two values, and the third parameter masked remaining value with #.