{"id":16724321,"url":"https://github.com/badboy/nobsign","last_synced_at":"2025-04-10T10:21:58.073Z","repository":{"id":57645297,"uuid":"44176448","full_name":"badboy/nobsign","owner":"badboy","description":"A simple but effective sign library, written in Rust","archived":false,"fork":false,"pushed_at":"2019-01-16T15:05:42.000Z","size":1019,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T06:22:42.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.rs/crate/nobsign","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badboy.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}},"created_at":"2015-10-13T12:59:53.000Z","updated_at":"2020-11-05T07:36:12.000Z","dependencies_parsed_at":"2022-09-08T15:30:40.526Z","dependency_job_id":null,"html_url":"https://github.com/badboy/nobsign","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Fnobsign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Fnobsign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Fnobsign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Fnobsign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badboy","download_url":"https://codeload.github.com/badboy/nobsign/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199080,"owners_count":21063641,"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-10-12T22:44:48.266Z","updated_at":"2025-04-10T10:21:58.038Z","avatar_url":"https://github.com/badboy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nobsign\n\n[![crates.io](http://meritbadge.herokuapp.com/nobsign)](https://crates.io/crates/nobsign)\n[![Build Status](https://travis-ci.org/badboy/nobsign.svg?branch=master)](https://travis-ci.org/badboy/nobsign)\n\nA simple but effective sign library, written in Rust.\n\nPorted from [nobi](https://github.com/cyx/nobi),\nwhich itself is a port of [itsdangerous](http://pythonhosted.org/itsdangerous/).\n\n## Documentation\n\n[Online Documentation](https://docs.rs/crate/nobsign).\n\n## Possible use cases\n\n* Creating an activation link for users\n* Creating a password reset link\n\n## Basic Example:\n\n```rust\nuse nobsign::Signer;\nlet signer = Signer::new(b\"my secret\");\n\n// Let's say the user's ID is 101\nlet signed = signer.sign(\"101\");\n\n// You can now email this url to your users!\nlet url = format!(\"http://yoursite.com/activate/?key={}\", signed);\n\n// Later check the signature and get the value back\nlet unsigned = signer.unsign(\u0026signed).unwrap();\n```\n\n## Example with timestamped signatures\n\n```rust\nuse nobsign::TimestampSigner;\nlet signer = TimestampSigner::new(b\"my secret\");\n\n// Let's say the user's ID is 101\nlet signed = signer.sign(\"101\");\n\n// You can now email this url to your users!\nlet url = format!(\"http://yoursite.com/activate/?key={}\", signed);\n\n// In your code, you can verify the expiration:\nsigner.unsign(\u0026signed, 86400).unwrap(); // 1 day expiration\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadboy%2Fnobsign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadboy%2Fnobsign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadboy%2Fnobsign/lists"}