USZipcode Algorithm
When masking the zipcode, the first 3 digits, the sectional center facility (SCF), are preserved and the last 2 digits are replaced using deterministic variable algorithm. The plus4digits are replaced using the deterministic variable algorithm, by default.
Algorithm Characteristics
- Algorithm: USZipcode
- Masking Technique: Anonymization
- Supported Types: String, Number
- Referential Integrity: false
- Conflict-free: false
- Realistic Data: true
- Reversible: false
Properties
-
zipcode5mask {
boolean; optional; default:true}
Iftrue, the zipcode (first 5 digits) are obfuscated. The first 3 digits, the sectional center facility (SCF), are preserved, and the last 2 digits are replaced using deterministic variable algorithm.
Example:"zipcode5mask": false -
plus4mask {
enum; optional; default:"VARIABLE"}
One ofDISCRETE,REPEAT, orVARIABLE.DISCRETEreplaces the plus4 digits with the value of theplus4discreteproperty.REPEATrepeats the first digit of the plus4 number 4 times. (e.g. "1234" => "1111").VARIABLEreplaces the plus4 digits with 4 digits generated suing a deterministic variable algorithm
Example:"plus4mask": "REPEAT" -
plus4discrete {
string; optional; default:"1234"}
When plus4mask property isDISCRETE, this string is used to replace original plus4 digits.
Example:"plus4discrete": "5555"
Example JSON configuration
{
"name": "ExampleZipcodeMasker",
"description": "Masks a zipcode preserving the sectional center facility (SCF), first three digits",
"algorithm": "USZipcode",
"plus4mask": "REPEAT"
}