The Randomize Hex Mask
The Randomize Hex mask replaces hexadecimal characters with randomized hexadecimal characters.
It will only replace hexadecimal characters. All other characters (eg. non-hexadecimal characters, spaces, special symbols, etc) are preserved.
This mask is primarily intended to work with text data types or data types that accept hexadecimal strings, such as the SQL Server 'uniqueidentifier' type.
Note: An empty string as input to the Randomize mask in SQL Server will return an empty string, whereas in Oracle NULL shall be returned (as is the convention.) A NULL input shall always return NULL for SQL Server and Oracle.
Case of Hex Chars
Specify whether hexadecimal characters A..F should be generated as uppercase ('A'..'F') or lowercase ('a'..'f')
For example, for an original field value of '098F-A317', UPPER CASE could generate 'B02C-91A6', whereas specifying lower case would have generated 'b02c-91a6'.
Generate distinct masked values when in deterministic mode for distinct original values (no collisions):
This section shall only be enabled if the mask is configured for deterministic mode otherwise it shall be disabled and the settings shall be ignored at runtime.
Select this box if all instances of a distinct original value are to be masked with the same distinct masked value. i.e. a one-to-one relationship for original-to-masked values.
If this box is selected and the input value is 'A123' and the masked value is '8C2F', then the masked value of '8C2F' will be generated for only the input value 'A123'.
If this box is not selected then it is possible that multiple different input values could produce the same masked value of '8C2F'.
Note: If you want the same set of masked values generated for the same set of original values on every Run then you must ensure that Deterministic mode is used.
Preserve or Mask:
If Preserve is selected from the combo box then the First and Last parameters shall describe how many characters from the original value shall be preserved in the masked value.
If Mask is selected from the combo box then the First and Last parameters shall describe how many characters in the original value shall be masked. All other characters shall be preserved.
This specifies how many of the first count of characters (of the adjacent character unit) shall be preserved or masked (as specified by "Preserve or Mask" described above).
The character unit combo box offers the selection:
Every character is counted, including non-hexadecimal. i.e. This yields a fixed offset.
Hexadecimal - Only hexadecimal characters are counted.
Suppose you have a field that contains a 12 hex characters formatted with non-hex
character. However, the formatting is variable, such as in the following sample
Therefore, if you wanted to preserve the first 4 hex characters and formatting in every
field while masking the remaining hex characters, you could specify the parameters:
Preserve, First 4 Hexadecimal, which could yield masked values something like:
This specifies how many of the last count of characters (of the adjacent character unit) shall be preserved or masked (as specified by "Preserve or Mask" described above).
Please consider installing DataVeil Native Library for much faster performance of this mask.
The following are the maximum character lengths per value to be masked:
SQL Server: 2GB