{"id":17304218,"url":"https://github.com/ericlewis/thotp","last_synced_at":"2025-06-15T08:39:17.888Z","repository":{"id":44551916,"uuid":"209410933","full_name":"ericlewis/THOTP","owner":"ericlewis","description":"Time-base \u0026 HMAC-based one-time password generator for iOS, tvOS, watchOS, and macOS","archived":false,"fork":false,"pushed_at":"2024-06-01T13:04:28.000Z","size":151,"stargazers_count":15,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-05T13:04:24.494Z","etag":null,"topics":["cryptokit","hotp","ios","ipados","macos","otp","otp-generator","otpauth","swift","swift-library","swift5-1","totp","tvos","watchos"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/ericlewis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-18T21:57:21.000Z","updated_at":"2025-04-09T10:14:46.000Z","dependencies_parsed_at":"2024-06-01T14:35:24.889Z","dependency_job_id":"d0dc9248-7eff-410a-93c9-8aa18a772991","html_url":"https://github.com/ericlewis/THOTP","commit_stats":{"total_commits":53,"total_committers":3,"mean_commits":"17.666666666666668","dds":"0.26415094339622647","last_synced_commit":"d1c0373bb3d3ffba8ff7266c27eef7596a4e1ca7"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/ericlewis/THOTP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FTHOTP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FTHOTP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FTHOTP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FTHOTP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericlewis","download_url":"https://codeload.github.com/ericlewis/THOTP/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlewis%2FTHOTP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259945844,"owners_count":22935903,"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":["cryptokit","hotp","ios","ipados","macos","otp","otp-generator","otpauth","swift","swift-library","swift5-1","totp","tvos","watchos"],"created_at":"2024-10-15T11:52:28.976Z","updated_at":"2025-06-15T08:39:17.864Z","avatar_url":"https://github.com/ericlewis.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"#\"\u003e\n        \u003cimg src=\"https://repository-images.githubusercontent.com/209410933/b4103000-dae0-11e9-9d44-c8a9d88f57b4\" alt=\"THOTP Logo\"\u003e\n    \u003c/a\u003e \n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://codecov.io/gh/ericlewis/THOTP\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/ericlewis/THOTP/branch/master/graph/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://ericlewis.github.io/THOTP/docs/\"\u003e\n        \u003cimg src=\"https://ericlewis.github.io/THOTP/docs/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/piknotech/SFSafeSymbols/blob/stable/LICENSE.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-MIT-lightgrey.svg\" alt=\"License: MIT\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/swift-5.1-FFAC45.svg\" alt=\"Swift: 5.1\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/apple/swift-package-manager\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/SwiftPM-✓-brightgreen.svg\" alt=\"SwiftPM: Compatible\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/platforms-iOS%20|%20tvOS%20|%20watchOS%20|%20macOS-purple.svg\"\n        alt=\"Platforms: iOS – tvOS – watchOS - macOS\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n  • \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n  • \u003ca href=\"https://ericlewis.github.io/THOTP/docs/\"\u003eDocumentation\u003c/a\u003e\n  • \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n  • \u003ca href=\"https://github.com/ericlewis/THOTP/issues\"\u003eIssues\u003c/a\u003e\n  • \u003ca href=\"https://github.com/ericlewis/THOTP/pulls\"\u003ePull Requests\u003c/a\u003e\n\u003c/p\u003e\n\n### TOTP \u0026 HOTP generator for iOS, tvOS, watchOS, and macOS\n\nPure Swift implementation of [time-based](https://en.wikipedia.org/wiki/Time-based_One-time_Password_algorithm) and [HMAC-based](https://en.wikipedia.org/wiki/HMAC-based_One-time_Password_algorithm) one-time password generators. Heavily inspired by the [OneTimePassword](https://github.com/mattrubin/OneTimePassword) library from [@mattrubin](https://github.com/mattrubin). Protocol based design, so you won't find any subclasses here.\n\n## Installation\n\n`THOTP` can be installed via Swift Package Manager.\n\nSupported platforms are iOS (13.0+), tvOS (13.0+), watchOS (6.0+), and macOS (10.15+).\n\n### Swift Package Manager\n\nThe easiest integration is to use the built in package manager tools in Xcode 11.0+. You can also do it manually.\n\nAdd the following as a dependency to your Package.swift:\n\n```swift\n.package(url: \"https://github.com/ericlewis/THOTP.git\", .upToNextMajor(from: \"1.0.0\"))\n```\n\nAfter specifying `THOTP` as a dependency of the target in which you want to use it, run:\n\n```bash\nswift package update\n```\n\n## Usage\n\nBy default, this includes basic concrete types for Password \u0026 Generators. If you are interested in persistence, there are a couple of options to choose from:\n\n- Implement `PasswordProtocol` with your own concrete type, such as `NSManagedObject`\n- Use [Valet-THOTP](https://github.com/ericlewis/Valet-THOTP), which adds extensions + a new concrete type for easily persisting using [Valet](https://github.com/square/Valet)\n\n### Basic\n\nThe simplest usage is to parse a URL. `THOTP` is compatible with [Google Authenticator's URI Scheme](https://github.com/google/google-authenticator/wiki/Key-Uri-Format).\n\n```swift\nlet password = try? Password(url: URL(string: \"otpauth://totp/test?secret=GEZDGNBV\")!)\nprint(password.currentPassword) // 123321\n```\n\n## Documentation\n\nDocs are generated with [jazzy](https://github.com/realm/jazzy) \u0026 can be found [here](https://ericlewis.github.io/THOTP/docs/). The process is currently manual, so it's possible for documentation to be out of date. Tests are a great way to see how to use this library.\n\n## License\n\nThis library is released under the [MIT License](http://opensource.org/licenses/MIT). See [LICENSE](https://github.com/ericlewis/THOTP/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlewis%2Fthotp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericlewis%2Fthotp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlewis%2Fthotp/lists"}