nobsign-0.1.0 doesn't have any documentation.
nobsign
A simple but effective sign library, written in Rust.
Ported from nobi, which itself is a port of itsdangerous.
Documentation
Possible use cases
- Creating an activation link for users
- Creating a password reset link
Basic Example:
use Signer;
let signer = new;
// Let's say the user's ID is 101
let signed = signer.sign;
// You can now email this url to your users!
let url = format!;
// Later check the signature and get the value back
let unsigned = signer.unsign.unwrap;
Example with timestamped signatures
use TimestampSigner;
let signer = new;
// Let's say the user's ID is 101
let signed = signer.sign;
// You can now email this url to your users!
let url = format!;
// In your code, you can verify the expiration:
signer.unsign.unwrap; // 1 day expiration