{"id":13340831,"url":"https://github.com/gizmo-ds/UdonOTPLib","last_synced_at":"2025-03-11T19:30:42.923Z","repository":{"id":134528326,"uuid":"544163276","full_name":"gizmo-ds/UdonOTPLib","owner":"gizmo-ds","description":"VRChat Udon OTP Library. contains a simple time-based one-time password example.","archived":false,"fork":false,"pushed_at":"2024-04-28T00:48:21.000Z","size":83,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-03T12:44:28.331Z","etag":null,"topics":["totp","udonsharp","vrchat"],"latest_commit_sha":null,"homepage":"","language":"C#","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/gizmo-ds.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}},"created_at":"2022-10-01T20:12:18.000Z","updated_at":"2024-04-28T00:47:32.000Z","dependencies_parsed_at":"2023-06-17T12:31:05.789Z","dependency_job_id":null,"html_url":"https://github.com/gizmo-ds/UdonOTPLib","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2FUdonOTPLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2FUdonOTPLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2FUdonOTPLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2FUdonOTPLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gizmo-ds","download_url":"https://codeload.github.com/gizmo-ds/UdonOTPLib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221243423,"owners_count":16783635,"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":["totp","udonsharp","vrchat"],"created_at":"2024-07-29T19:24:02.609Z","updated_at":"2024-10-23T22:31:03.098Z","avatar_url":"https://github.com/gizmo-ds.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UdonOTPLib\n\nVRChat Udon OTP Library, HOTP([RFC 4226](https://tools.ietf.org/html/rfc4226)) \u0026 TOTP([RFC 6238](https://tools.ietf.org/html/rfc6238)).\n\n\u003e [!Caution]  \n\u003e This project is a personal learning exercise and serves as a demonstration of my learning outcomes. It is not intended for production environments or serious business applications. Use the code in this project at your own risk.\n\n[Demo world](https://vrchat.com/home/launch?worldId=wrld_1590a2c1-7f17-40b7-a71c-b90b542a204c)\n\n👇 Example video\n\n[![thumbnail](https://i.imgur.com/pPMESvY.jpg)](https://youtu.be/KfkS4VoFgxc)\n\n## Requirements\n\n- Unity 2022.3.6f1\n- VRChat SDK - Worlds (Tested version: 3.5.2)\n\n## How to use\n\n\u003e Contains a simple example that you can use however you want.\n\n1. Make sure you have imported the latest `VRChat SDK - Worlds`.\n2. Download the latest [release](https://github.com/gizmo-ds/UdonOTPLib/releases/latest) and import it into your project.\n3. Open the `_Gizmo/UdonOTPLib/Example/TOTP_Example.unity` scene.\n4. You may need to import `TextMeshPro`.\n5. Edit the `Secret` variable in the `TOTP_Example` gameobject. (You can use [totp-wasm.vercel.app](https://totp-wasm.vercel.app?secret=2LESRALCTRW3B3J4WYSXFQYE5ZR6V5R2) to generate `Secret`)\n6. enjoy 🤓\n\n### Parameter\n\n| Name   | Type   | Description                  |\n| ------ | ------ | ---------------------------- |\n| secret | string | Secret key encoded in base32 |\n| digits | int    | Code digits                  |\n| period | int    | Time period (seconds)        |\n| t      | double | Timestamp                    |\n\n### Code example\n\n```cs\nstring secret = \"2LESRALCTRW3B3J4WYSXFQYE5ZR6V5R2\";\nint digits = 6;\nint period = 30;\n\n// Get the code\nstring code = otp.TOTP(secret, otp.Timestamp(), digits, period);\nDebug.Log($\"Code: {code}\");\n\n// Countdown\nint s = otp.Countdown(period);\nDebug.Log($\"Countdown: {s}sec\");\n```\n\n## Related\n\n- [totp-wasm](https://github.com/gizmo-ds/totp-wasm)\n- [totp-wasm-zig](https://github.com/gizmo-ds/totp-wasm-zig)\n\n## License\n\nCode is distributed under [MIT license](./LICENSE), feel free to use it in your proprietary projects as well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgizmo-ds%2FUdonOTPLib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgizmo-ds%2FUdonOTPLib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgizmo-ds%2FUdonOTPLib/lists"}