View Source EctoAnon.Functions.AnonymizedEmail (ecto_anon v0.4.0)
Anonymizing module for an email
Link to this section Summary
Functions
Returns an anonymized email with hashes while keeping the email format
Link to this section Functions
Returns an anonymized email with hashes while keeping the email format
options
Options
:partial
- When set totrue
, it keeps the first character of each part and hides the rest
example
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"