API Reference fields v2.9.0

modules

Modules

Encrypt values with AES in Galois/Counter Mode (GCM) https://en.wikipedia.org/wiki/Galois/Counter_Mode using a random Initialisation Vector for each encryption, this makes "bruteforce" decryption much more difficult. See encrypt/1 and decrypt/1 for more details.

An Ecto Type for plaintext addresses. Useful for publicly available addressses. See Fields.AddressEncrypted for storing addresses that are Personally Identifiable Information.

An Ecto Type for encrypted addresses.

An Ecto Type for plaintext description fields with no length restrictions. Strips out all HTML tags to avoid XSS.

An Ecto Type for encrypted emails.

An Ecto Type for hashed emails. Use in conjuction with Fields.EmailEncrypted in order to be able to look up database rows by email. Hashed using sha256. See Fields.Helpers for hashing details.

An Ecto Type for plaintext emails. Useful for publicly available email addressses such as customer support emails. See Fields.EmailEncrypted and Fields.EmailHash for storing user email addresses.

An Ecto Type for encrypted fields. See Fields.AES for details on encryption/decryption.

An Ecto Type for hashed fields. Hashed using sha256. See Fields.Helpers for hashing details.

Helper functions for hashing, generating (random) salt values and fetching secrets form environment.

An Ecto Type for bodies of html text. Strips out all HTML script tags to avoid XSS but allows other basic HTML elements to remain.

An Ecto Type for encrypted ip addresses.

An Ecto Type for hashed ip addresses. Hashed using sha256. See Fields.Helpers for hashing details.

An Ecto Type for plaintext ip address.

An Ecto Type for names that need to be stored securely.

An Ecto Type for hashed passwords. Hashed using Argon2. See Fields.Helpers for hashing details.

An Ecto Type for plaintext phone numbers. Useful for publicly available numbers such as customer support. See Fields.PhoneNumberEncrypted for storing numbers that are Personally Identifiable Information.

An Ecto Type for encrypted phone numbers.

An Ecto Type for plaintext postcodes. Use for publicly available postcodes. For personal data, use Fields.PostcodeEncrypted instead.

An Ecto Type for encrypted postcodes. See Fields.AES for details on encryption/decryption.

An Ecto Type for urls. Use Fields.UrlEncrypted for encrypted urls.

An Ecto Type for urls that need to be stored securely.

Helper functions to validate the data in certain fields