View Source EctoAnon.Functions.AnonymizedEmail (ecto_anon v0.6.0)
Anonymizing module for an email
Summary
Functions
Returns an anonymized email with hashes while keeping the email format
Functions
Returns an anonymized email with hashes while keeping the email format
Options
:partial- When set totrue, it keeps the first character of each part and hides the rest
Example
AnonymizedEmail.run(:string, "john.doe@email.com", [])
"5d526ea414@a717679b0f.com"
AnonymizedEmail.run(:string, "not_an_email", [])
"c2fd076ad9@c2fd076ad9.com"
AnonymizedEmail.run(:string, "john.doe@email.com", partial: true)
"j******@e******.com"