Skip to main content
Version: 3.0

HashList Algorithm

Replaces original string data with a realistic replacement by selecting a row and generating the masked string from the fields of the provided CSV file.

Algorithm Characteristics

  • Algorithm: HashList
  • Masking Technique: Substitution
  • Supported Types: String
  • Referential Integrity: true
  • Conflict-free: false
  • Realistic Data: true
  • Reversible: false

Properties

  • useInputCase { boolean; optional; default: false }
    If true then the case of the original data value is used when selecting a record from the csv file to use as the substitute data value. This implies that 2 original data values that differ only in the case will result in different masked values.
    Example: "useInputCase": true

  • csvFile { string; optional; default: null }
    The name of the resource csv file which contains the replacement records used to select the substitute masked value.
    Example: "csvFile": "custom/maskingdata/names.csv"

  • index { int[]; optional; default: -1 }
    A field index used to select a field from the csvFile to be the substitute masked value.
    Example: "index": 1

  • indexList { int[]; optional; default: [ 0, 1 ] }
    The list of field indexes used to select the fields from the csvFile to generate a substitute data value. The order of the fields is significant. It is used to when they are concatenated.
    Example: "indexList": [ 0, 1 ]

  • separator { string; optional; default: (space) }
    If there are multiple fields selected using the indexList property, then separator string is used to concatenate the fields. Example: "separator": ", "

  • maskFormat { string; optional; default: null }
    If there are multiple fields selected using the indexList property, then if the maskFormat property is set, it is used as the format string for the Java String.format() method. The selected fields are provided to the String.format() method as arguments.
    (See Formatter (Java Platform SE 8 ) - Oracle Help Center for details of the format specification)
    Example: "maskFormat": ", "

Example JSON configuration

{
"name": "ExampleHashListlMasker",
"description": "Replaces original string data with a realistic, culturally USA, full name in a 'lastname, firstname' comma seperated format.",
"algorithm": "HashList",
"trimWhiteSpace": true,
"csvFile": "obfusware/maskingdata/us-addresses.csv",
"indexList": [ 0, 1 ],
"maskFormat\": "%2$s, %1$s"
}

Default Maskers based on the HashList Algorithm

  1. USLastNameMasker
  2. USFirstNameMasker
  3. USFullNameMasker
  4. USCommaNameMasker
  5. USStreetAddress1Masker
  6. USCityMasker
  7. USStateNameMasker
  8. USStateAbbrMasker
  9. CountryMasker
  10. CountryAbbrMasker
  11. USCountyMasker