{"id":17694793,"url":"https://github.com/chardoncs/minotp","last_synced_at":"2026-02-10T19:35:59.719Z","repository":{"id":220839797,"uuid":"752612519","full_name":"chardoncs/minotp","owner":"chardoncs","description":"Simple OTP library for Rust.","archived":false,"fork":false,"pushed_at":"2025-01-01T01:36:33.000Z","size":37,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T22:49:52.698Z","etag":null,"topics":["cryptography","hotp","one-time-password","otp","rust","totp"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/minotp","language":"Rust","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/chardoncs.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-04T11:10:57.000Z","updated_at":"2025-09-13T14:59:18.000Z","dependencies_parsed_at":"2025-01-01T02:23:48.126Z","dependency_job_id":"7e0d2acb-699e-48e4-9d3b-ec9711c01bd3","html_url":"https://github.com/chardoncs/minotp","commit_stats":null,"previous_names":["chardon55/minotp","chardoncs/minotp"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/chardoncs/minotp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Fminotp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Fminotp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Fminotp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Fminotp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chardoncs","download_url":"https://codeload.github.com/chardoncs/minotp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Fminotp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29313156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cryptography","hotp","one-time-password","otp","rust","totp"],"created_at":"2024-10-24T13:49:44.741Z","updated_at":"2026-02-10T19:35:59.694Z","avatar_url":"https://github.com/chardoncs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minotp\n\n![GitHub Release](https://img.shields.io/github/v/release/chardon55/minotp)\n\nSimple OTP library for Rust.\n\n## Usage\n\n### Installation\n\nAdd `minotp` into your project.\n\n```bash\ncargo add minotp@1\n```\n\nAlso all hash libraries you want (e.g., SHA1 of [Rust Crypto](https://github.com/RustCrypto)).\n\n```bash\ncargo add sha1\n```\n\n### TOTP (commonly used)\n\n```rust\nuse minotp::*;\nuse sha1::Sha1;\n\nlet secret = b\"test\";\n\nlet totp = Totp::\u003cSha1\u003e::from_bytes(secret, 30).unwrap();\n\n// Get remaining seconds\nlet _remaining_seconds = totp.remaining_sec();\n\n// Get token as a 6-digit owned string\nlet _token = totp.gen_6_str();\n\n// -- snip -- //\n```\n\nUse an encoding crate to decode a Base32 encoded secret\nif you have to deal with one.\n\nFor example, using [`data_encoding`](https://crates.io/crates/data-encoding).\n\n```rust\nuse data_encoding::BASE32;\nuse minotp::*;\nuse sha1::Sha1;\n\nlet secret_base32_str = \"ORSXG5A=\";\n\nlet secret = BASE32.decode(secret_base32_str.as_bytes()).unwrap();\n\nlet totp = Totp::\u003cSha1\u003e::from_bytes(\u0026secret, 30).unwrap();\n\nlet _token = totp.gen_6_str();\n\n// -- snip -- //\n```\n\n## Found any bug?\n\n~~You must be kidding.~~ Fire an issue right now if you found one!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchardoncs%2Fminotp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchardoncs%2Fminotp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchardoncs%2Fminotp/lists"}