{"id":17188244,"url":"https://github.com/jclem/encrypted_field","last_synced_at":"2025-04-13T19:14:00.222Z","repository":{"id":52173187,"uuid":"167703756","full_name":"jclem/encrypted_field","owner":"jclem","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-26T19:15:24.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T17:31:09.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jclem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-26T15:25:34.000Z","updated_at":"2020-01-19T01:51:59.000Z","dependencies_parsed_at":"2022-08-23T21:31:08.784Z","dependency_job_id":null,"html_url":"https://github.com/jclem/encrypted_field","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fencrypted_field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fencrypted_field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fencrypted_field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fencrypted_field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jclem","download_url":"https://codeload.github.com/jclem/encrypted_field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766749,"owners_count":21158301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-15T01:08:29.621Z","updated_at":"2025-04-13T19:14:00.202Z","avatar_url":"https://github.com/jclem.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EncryptedField\n\nProvides an encrypted field for use in an Ecto schema.\n\n## Usage\n\nFirst, configure an encryption key. An easy way to do this is with pwgen\n(`brew install pwgen`):\n\n```sh\nbrew install pwgen\npwgen -1 32\n```\n\nYou can configure this key at runtime using a `{:system, \"key\"}` tuple:\n\n```elixir\nconfig :encrypted_field, :key, {:system, \"ENCRYPTED_FIELD_KEY\"}\n```\n\nThen, use it in an Elixir schema:\n\n```elixir\ndefmodule MyApp.User do\n  use Ecto.Schema\n\n  schema \"users\" do\n    field :token, EncryptedField\n  end\nend\n```\n\nWhen this value is written to the database, it will be encrypted with your\nsecret key using AES in CTR mode, and Base64-encoded. At runtime, the value will\nbe decrypted.\n\n## Installation\n\nThe package can be installed by adding `encrypted_field` to your list of\ndependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:encrypted_field, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/encrypted_field](https://hexdocs.pm/encrypted_field).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjclem%2Fencrypted_field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjclem%2Fencrypted_field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjclem%2Fencrypted_field/lists"}