Anonymizing Data
I guess that you already had a need to anonymize some data!
You have a lot of real world information containing person names, addresses, phone numbers, email, etc… and you need to import that information into a production database. However you need to test this in other environments such as Development or Quality, and by the way, if this is real world information… this might be the best data that you have to test your application.
If you eventually ended up by importing real world information into Development and Quality environments where a lot of people can have access and dump this information, this could lead to problems for you and your company.
Another way to do it is to use the data but anonymize it.
I had this need a couple of weeks ago and instead of just implement the idea, I implemented it and shared it as a Outsystems Forge component for you to use it. You can grab it here:
https://www.outsystems.com/forge/component-overview/20696/anonymizer-o11
What does it do?
Anonymizer scrambles letters and numbers and retains other character positions.
How does it do it?
It takes an input string, finds all characters that are letters or digits, shuffles them (randomizes their order), and then puts them back in their original positions. As a result, characters like @, ., +, -, _, and any other symbols remain fixed in place, and only letters (A-Z, a-z) and digits (0-9) get shuffled around.
- Letters and digits within the string are shuffled, so their positions relative to each other are randomized;
- All non-alphanumeric characters (such as punctuation and symbols) remain in place;
- The overall string length and positions of special characters do not change, ensuring only the letters and digits are scrambled;
- Capitalization will be retained on individual string indexes. This is useful when string contains names, where first letter of each word will remain capitalized;
Examples:
- Before:
"Tiago Dias" - After: Something like
"Aigi Otasd"(your output will vary each time you run it, due to randomization).
- Before:
"john.doe@example123.com" - After: Something like
"hjon.eod@exbmpla312.ocm"(your output will vary each time you run it, due to randomization).
- Before:
"+351 92 357 41x2" - After: Something like
"+921 35 375 24x1"(your output will vary each time you run it, due to randomization).
Avoid using real world data in non production environments
Tiago