{"id":13736442,"url":"https://github.com/randy3k/otp","last_synced_at":"2026-03-14T15:09:04.893Z","repository":{"id":56936362,"uuid":"258395575","full_name":"randy3k/otp","owner":"randy3k","description":"One Time Password Generation and Verification","archived":false,"fork":false,"pushed_at":"2024-01-23T06:12:33.000Z","size":210,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T06:36:22.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://randy3k.github.io/otp","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/randy3k.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-24T03:31:19.000Z","updated_at":"2025-01-29T11:26:28.000Z","dependencies_parsed_at":"2024-10-28T10:30:16.077Z","dependency_job_id":null,"html_url":"https://github.com/randy3k/otp","commit_stats":{"total_commits":38,"total_committers":1,"mean_commits":38.0,"dds":0.0,"last_synced_commit":"2fb79e1bef84d4aa4aab5fcdfedfd12116b9a4f2"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randy3k%2Fotp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randy3k%2Fotp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randy3k%2Fotp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randy3k%2Fotp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randy3k","download_url":"https://codeload.github.com/randy3k/otp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141444,"owners_count":20404837,"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-08-03T03:01:21.845Z","updated_at":"2026-03-14T15:08:59.831Z","avatar_url":"https://github.com/randy3k.png","language":"R","funding_links":[],"categories":["Backend","R"],"sub_categories":["Authentication"],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_knit$set(upload.fun = knitr::imgur_upload)\n```\n\n```{r results='asis', echo = FALSE, eval = TRUE}\nd \u003c- read.dcf(\"DESCRIPTION\")\n```\n\n```{r results=\"asis\", echo = FALSE, eval = TRUE}\ntitle \u003c- d[colnames(d) == \"Title\"]\ncat(c(\"# \", paste(trimws(strsplit(title, \"\\n\")[[1]]), collapse = \" \")))\n```\n\n[![check](https://github.com/randy3k/otp/actions/workflows/check.yaml/badge.svg)](https://github.com/randy3k/otp/actions/workflows/check.yaml)\n[![codecov](https://codecov.io/gh/randy3k/otp/branch/master/graph/badge.svg)](https://app.codecov.io/gh/randy3k/otp)\n[![CRAN\\_Status\\_Badge](http://www.r-pkg.org/badges/version/otp)](https://cran.r-project.org/package=otp)\n[![](http://cranlogs.r-pkg.org/badges/grand-total/otp)](https://cran.r-project.org/package=otp)\n\n\nGithub: [https://github.com/randy3k/otp](https://github.com/randy3k/otp)\n\nDocumentation: [https://randy3k.github.io/otp](https://randy3k.github.io/otp/)\n\n```{r results=\"asis\", echo = FALSE, eval = TRUE}\ncat(d[colnames(d) == \"Description\"])\n```\n\n## Installation\n\nYou can install the released version of otp from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"otp\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"randy3k/otp\")\n```\n## Example\n\n```{r}\nlibrary(otp)\n```\n\n### HMAC based One Time Password (HOTP)\n\n```{r}\np \u003c- HOTP$new(\"JBSWY3DPEHPK3PXP\")\np$at(8)\np$verify(\"964230\", 8)\n```\n\n### Time based One Time Password (TOTP)\n\n```{r}\np \u003c- TOTP$new(\"JBSWY3DPEHPK3PXP\")\n(code \u003c- p$now())\np$verify(code)\n```\n\n```{r, out.width = \"20%\"}\nraster::image(\n  qrencoder::qrencode_raster(p$provisioning_uri(\"otp\")),\n  asp = 1, col = c(\"white\", \"black\"), axes = FALSE,\n  xlab = \"\", ylab = \"\"\n)\n```\n\n## Related projects\n\n- Ruby's [rotp](https://github.com/mdp/rotp).\n- Python's [pyotp](https://github.com/pyauth/pyotp).\n- [ropt](https://github.com/wrathematics/rotp), an R library for client side one time password management.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandy3k%2Fotp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandy3k%2Fotp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandy3k%2Fotp/lists"}