{"id":13562549,"url":"https://github.com/dashbitco/nimble_totp","last_synced_at":"2025-05-14T10:05:18.409Z","repository":{"id":40557839,"uuid":"271820809","full_name":"dashbitco/nimble_totp","owner":"dashbitco","description":"A tiny Elixir library for time-based one time passwords (TOTP)","archived":false,"fork":false,"pushed_at":"2024-11-07T07:30:25.000Z","size":45,"stargazers_count":427,"open_issues_count":0,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T21:40:53.441Z","etag":null,"topics":["2fa","elixir","totp"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/dashbitco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-12T14:43:23.000Z","updated_at":"2025-04-02T17:04:11.000Z","dependencies_parsed_at":"2024-05-01T16:19:38.242Z","dependency_job_id":"a68f03a5-345e-416d-8293-6c1d23fd24cc","html_url":"https://github.com/dashbitco/nimble_totp","commit_stats":{"total_commits":36,"total_committers":13,"mean_commits":2.769230769230769,"dds":0.7777777777777778,"last_synced_commit":"60cddbfabf275ab1a4d11cdff5b73e91138515ed"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashbitco%2Fnimble_totp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashbitco%2Fnimble_totp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashbitco%2Fnimble_totp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashbitco%2Fnimble_totp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashbitco","download_url":"https://codeload.github.com/dashbitco/nimble_totp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248335456,"owners_count":21086596,"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":["2fa","elixir","totp"],"created_at":"2024-08-01T13:01:09.811Z","updated_at":"2025-04-11T03:32:51.793Z","avatar_url":"https://github.com/dashbitco.png","language":"Elixir","funding_links":[],"categories":["Cryptography","Elixir"],"sub_categories":[],"readme":"# NimbleTOTP\n\nThis library allows developers to implement Time-based One-Time Passwords (TOTP)\nfor their applications as one of the mechanisms for Two-factor authentication (2FA).\n\nIt provides functions to:\n\n  * Generate secrets composed of random bytes.\n  * Generate URIs to be encoded in a QR Code.\n  * Generate Time-Based One-Time Passwords for a secret.\n\nDocumentation can be found at https://hexdocs.pm/nimble_totp.\n\n## Installation\n\nYou can install `nimble_totp` by adding it to your list of\ndependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:nimble_totp, \"~\u003e 1.0\"}\n  ]\nend\n```\n\n## Usage\n\nGenerating a secret composed of random bytes:\n\n```elixir\nsecret = NimbleTOTP.secret()\n#=\u003e \u003c\u003c63, 24, 42, 30, 95, 116, 80, 121, 106, 102\u003e\u003e\n```\n\nGenerating a URI to be encoded in a QR Code:\n\n```elixir\nNimbleTOTP.otpauth_uri(\"Acme:alice\", secret, issuer: \"Acme\")\n#=\u003e \"otpauth://totp/Acme:alice?secret=MFRGGZA\u0026issuer=Acme\"\n```\n\nGenerating a Time-Based One-Time Password for a secret and validating it:\n\n```elixir\nNimbleTOTP.verification_code(secret)\n#=\u003e \"569777\"\n\nNimbleTOTP.valid?(secret, \"569777\")\n#=\u003e true\n```\n\n## Nimble*\n\nAll nimble libraries by Dashbit:\n\n  * [NimbleCSV](https://github.com/dashbitco/nimble_csv) - simple and fast CSV parsing\n  * [NimbleOptions](https://github.com/dashbitco/nimble_options) - tiny library for validating and documenting high-level options\n  * [NimbleParsec](https://github.com/dashbitco/nimble_parsec) - simple and fast parser combinators\n  * [NimblePool](https://github.com/dashbitco/nimble_pool) - tiny resource-pool implementation\n  * [NimblePublisher](https://github.com/dashbitco/nimble_publisher) - a minimal filesystem-based publishing engine with Markdown support and code highlighting\n  * [NimbleTOTP](https://github.com/dashbitco/nimble_totp) - tiny library for generating time-based one time passwords (TOTP)\n\n## License\n\nCopyright 2020 Dashbit\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashbitco%2Fnimble_totp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashbitco%2Fnimble_totp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashbitco%2Fnimble_totp/lists"}