DataMasque Portal

Determining what unique key masking to use

imitate_unique is the recommended default for unique masking. The other three options below are deprecated. They are documented here so that you can recognise them in an existing ruleset and choose what to replace them with.

imitate_unique

Use Case:

  • The recommended default for unique masking. Best for deterministic, format-preserving masking of strings or integers with physical FK propagation.

Key Features:

  1. Deterministic, unique values for unique input.
  2. Supports custom character sets, checksum validation, and prefix/suffix preservation.
  3. Propagates masked PK values to physical FK columns.
  4. Increases security over from_unique_imitate by preventing repeated series of characters in a single value from masking identically.
  5. Guarantees consistent values across runs or databases with the same run_secret and seed.

mask_unique_key

Deprecated: Use a mask_table task with the imitate_unique mask on the key column instead, unless you need logical foreign key propagation. See Mask a primary key or unique key.

Use Case:

  • Best for generating unique values and propagating these to both physical and logical foreign key (FK) columns.

Key Features:

  1. Allows specifying the data format.
  2. Generates unique values.
  3. Propagates to physical and logical FK columns.
  4. Disallows hash_columns on itself or other columns.
  5. Ensures primary key (PK) columns are unique before masking.
  6. No guaranteed consistency across masking runs or databases.

from_unique

Deprecated: Use a mask_table task with the imitate_unique mask on the key column instead.

Use Case:

  • Ideal for generating unique values without the need for FK column propagation.

Key Features:

  1. Allows specifying the data format.
  2. Generates unique values.
  3. Disallows hash_columns on itself or other columns.
  4. Does not propagate masked PK values to physical and logical FK columns. 5.No guaranteed consistency across masking runs or databases.

from_unique_imitate

Deprecated: Use a mask_table task with the imitate_unique mask on the key column instead.

Use Case:

  • Used when consistent values across masking runs or databases are required, and FK relationships are needed to be maintained without specifying data format.

Key Features:

  1. Does not allow data format specification.
  2. Hashes on itself and generates unique values.
  3. Propagates masked PK values to physical and logical FK columns.
  4. Guarantees consistent values across runs or databases with the same run_secret.