{"id":44675409,"url":"https://github.com/dwtechnologies/anonymize","last_synced_at":"2026-02-15T03:05:16.889Z","repository":{"id":57493155,"uuid":"78335748","full_name":"dwtechnologies/anonymize","owner":"dwtechnologies","description":"Anonymize / Normalize package for Go","archived":false,"fork":false,"pushed_at":"2017-05-11T08:38:40.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-14T05:01:44.665Z","etag":null,"topics":["anonymization","encryption"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dwtechnologies.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-08T10:20:50.000Z","updated_at":"2017-05-23T20:26:46.000Z","dependencies_parsed_at":"2022-08-28T17:02:30.510Z","dependency_job_id":null,"html_url":"https://github.com/dwtechnologies/anonymize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dwtechnologies/anonymize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fanonymize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fanonymize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fanonymize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fanonymize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwtechnologies","download_url":"https://codeload.github.com/dwtechnologies/anonymize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fanonymize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anonymization","encryption"],"created_at":"2026-02-15T03:05:16.397Z","updated_at":"2026-02-15T03:05:16.884Z","avatar_url":"https://github.com/dwtechnologies.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anonymize\n\nThe anonymize package can anonymize and/or normalize various forms of inputs (currently text, phone numbers and e-mails).\n\nThe anonymization part will use a variable salt based on the OS ENV var $SALT and encrypt it with SHA512. The variable part is based on the first UTF8 char number of the string to be anonymized.\n$SALT must be at least 128 characters long.\n\nThe normalization will make sure that the input text will always be the same independent of case or leading/trailing whitespaces and such. It will also make phone numbers have a predictable format leading with 00 and removing all non-numeric characters.\n\nThe normalize and anonmyize first normalize the data and then anonymizes it.\n\n----------\n\nThe package has the following functions.\n\n\n## Email\n\n### EmailAnonymize\n\n```text\nEmailAnonymize anonymizes String s with sha512 and with a random salt from OS env-var $SALT.\nIt returns an encrypted string.\n```\n\n### EmailNormalize\n\n```text\nEmailNormalize normalizes String s to lowercase and removes all spaces and tabs.\nIt returns an normalized string.\n```\n\n### EmailNormAnonymize\n\n```text\nEmailNormAnonymize normalizes String s to lowercase and removes all spaces and tabs and\nalso hashes s with sha512 and with a random salt from OS env-var $SALT.\nIt returns an normalized then encrypted string.\n```\n\n## Text / String\n\n### StringAnonymize\n\n```text\nStringAnonymize anonymizes String s with sha512 and with a random salt from OS env-var $SALT.\nIt returns an encrypted string.\n```\n\n### StringNormalize\n\n```text\nStringNormalize normalizes String s to lowercase and removes all leading and trailing spaces and tabs.\nIt returns an normalized string.\n```\n\n### StringNormAnonymize\n\n```text\nStringNormAnonymize normalizes String s to lowercase and removes all leading and trailing spaces and tabs and\nhashes s with sha512 and with a random salt from OS env-var $SALT.\nIt returns an normalized then encrypted string.\n```\n\n## Phone Number\n\n### PhoneAnonymize\n\n```text\nPhoneAnonymize anonymizes String s with sha512 and with a random salt from OS env-var $SALT.\nIt returns an encrypted string.\n```\n\n### PhoneNormalize\n\n```text\nPhoneNormalize normalizes String s by removing all spaces and tabs and replacing the first\n\"+\" with \"00\" and removing all other characters other than 0-9.\nIt returns an normalized string.\n```\n\n### PhoneNormAnonymize\n\n```text\nPhoneNormAnonymize normalizes String s by removing all spaces and tabs and replacing the first\n\"+\" with \"00\" and removing all other characters other than 0-9 and\nhashes s with sha512 and with a random salt from OS env-var $SALT.\nIt returns an normalized then encrypted string.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwtechnologies%2Fanonymize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwtechnologies%2Fanonymize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwtechnologies%2Fanonymize/lists"}