Obfuscator tokenises PII fields, and the logic is hard-coded into the obfuscate_fields function. This functionality should be abstracted to its own function, which is called by obfuscate_fields.
Proposed solution
obfuscate_fields should have an argument method which defaults to "tokenise". The obfuscation method should be defined at the instantiation of the Obfuscator class.
Issue
Obfuscator
tokenises PII fields, and the logic is hard-coded into theobfuscate_fields
function. This functionality should be abstracted to its own function, which is called byobfuscate_fields
.Proposed solution
obfuscate_fields
should have an argumentmethod
which defaults to "tokenise". The obfuscation method should be defined at the instantiation of theObfuscator
class.