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

Specifies 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'.

 

Distinct Deterministic

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.

Example:

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'.

 

If the same set of masked values is required for the same set of original values on every masking run then Deterministic mode must be used.

 

Masking Range

This panel allows you to specify a partial range of an original value to be selected for masking. The default, as shown in the mask above, shall select the entire value.

See the example below for a screen capture that shows a partial masking range selection.
  

Select Range

This defines what part of each value shall be selected for masking (subject further to the First and Last parameters below). Everything outside of this range shall be preserved.

Entire Field - The entire value is selected.

Before Substring - Only that part of the value from the appears before the specified substring in the value shall be selected for masking. The substring and remainder of the value shall be preserved.

After Substring - Only that part of the value from the appears after the specified substring in the value shall be selected for masking. The substring and part of the value that appears before the substring shall be preserved.
 

Substring

The substring that shall be considered the delimiter of the masking range.

Every character in this field is significant including quotes and spaces. Therefore, unless you want to search the field for a quotes and spaces do not include them in this field.
 

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.
 

First

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:

All                    - Every character is counted, including non-hexadecimal. i.e. This yields a fixed offset.
Hexadecimal   - Only hexadecimal characters are counted.

Example:

Suppose a field that contains a 12 hex characters formatted with non-hex character. However, the formatting is variable, such as in the following sample data:

CA45-92FEB241
>CA:45-882B-F76C

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 would yield masked values something like:

CA45-8DC56B42
>CA:45-21CD-F81A
 

Last

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).

 

Performance

Please consider installing DataVeil Native Library for much faster performance of this mask.

 

Size Limitations

The following are the maximum character lengths per value to be masked:

MySQL: 65,535
Oracle: 4,000
SQL Server/Azure: 2GB