{"id":19952298,"url":"https://github.com/sparrowcode/otp","last_synced_at":"2025-07-03T21:37:15.348Z","repository":{"id":37706724,"uuid":"506145039","full_name":"sparrowcode/OTP","owner":"sparrowcode","description":"Generating OTP one-time passwords in Swift.","archived":false,"fork":false,"pushed_at":"2022-06-23T17:59:18.000Z","size":18,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-03T19:39:11.771Z","etag":null,"topics":["2fa","one-time-password","one-time-passwords","otp","otp-applications","otp-codes","otp-generator","otp-library","otp-verification","swift"],"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/sparrowcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["sparrowcode"]}},"created_at":"2022-06-22T07:36:23.000Z","updated_at":"2024-07-15T11:33:15.000Z","dependencies_parsed_at":"2022-09-15T22:43:34.873Z","dependency_job_id":null,"html_url":"https://github.com/sparrowcode/OTP","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sparrowcode/OTP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparrowcode%2FOTP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparrowcode%2FOTP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparrowcode%2FOTP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparrowcode%2FOTP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sparrowcode","download_url":"https://codeload.github.com/sparrowcode/OTP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sparrowcode%2FOTP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263409084,"owners_count":23462192,"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","one-time-password","one-time-passwords","otp","otp-applications","otp-codes","otp-generator","otp-library","otp-verification","swift"],"created_at":"2024-11-13T01:12:32.187Z","updated_at":"2025-07-03T21:37:15.297Z","avatar_url":"https://github.com/sparrowcode.png","language":"Swift","readme":"# One Time Password\n\n\u003cp float=\"left\"\u003e\n    \u003ca href=\"https://apps.apple.com/app/id1625641322\"\u003e\n        \u003cimg src=\"https://cdn.sparrowcode.io/github/badges/download-on-the-appstore.png?version=2\" height=\"52\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/sponsors/sparrowcode\"\u003e\n        \u003cimg src=\"https://cdn.sparrowcode.io/github/badges/github-sponsor.png?version=3\" height=\"52\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Navigate\n\n- [Installation](#installation)\n    - [Swift Package Manager](#swift-package-manager)\n    - [CocoaPods](#cocoapods)\n    - [Manually](#manually)\n- [Usage](#usage)\n- [Apps Using](#apps-using)\n\n## Installation\n\nReady to use on iOS 13+, tvOS 13+ \u0026 watchOS 6+\n\n### Swift Package Manager\n\nIn Xcode go to `File` -\u003e `Packages` -\u003e `Update to Latest Package Versions` and insert url: \n\n```\nhttps://github.com/sparrowcode/OTP\n```\n\nor adding it to the `dependencies` value of your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/sparrowcode/OTP\", .upToNextMajor(from: \"1.0.0\"))\n]\n```\n\n### CocoaPods:\n\nSpecify it in your `Podfile`:\n\n```ruby\npod 'OTP'\n```\n\n### Manually\n\nIf you prefer not to use any of dependency managers, you can integrate manually. Put `Sources/OTP` folder in your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.\n\n## Usage\n\n```swift\n// With default parametrs\nlet password = OTP.generateOTP(secret: \"secret\")\n\n// With custom values\nlet password = OTP.generateOTP(secret: \"secret\", algorithm: OTPAlgorithm = .sha1, expirationTimeInSeconds: Int = 30, digits: Int = 6)\n```\n\n## Apps Using\n\n\u003cp float=\"left\"\u003e\n    \u003ca href=\"https://apps.apple.com/app/id1625641322\"\u003e\u003cimg src=\"https://cdn.sparrowcode.io/github/apps-using/id1625641322.png?version=2\" height=\"65\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nIf you use a `OTP`, add your application via Pull Request.\n","funding_links":["https://github.com/sponsors/sparrowcode"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparrowcode%2Fotp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparrowcode%2Fotp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparrowcode%2Fotp/lists"}