CJohnston079 / obfuscator

0 stars 0 forks source link

Add `method` argument to `Obfuscator.obfuscate` to allow custom obfuscation methods to be called #25

Closed CJohnston079 closed 4 months ago

CJohnston079 commented 4 months ago

Issue

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.

CJohnston079 commented 4 months ago

Resolved in 1cafd8a2531f86a9736f7ecc114b92b7080aea6b.