Crates.io | rotkeappchen |
lib.rs | rotkeappchen |
version | 0.1.0 |
source | src |
created_at | 2023-12-30 20:29:33.310646 |
updated_at | 2023-12-30 20:29:33.310646 |
description | Crate for generating stateless and rotating verification codes. |
homepage | |
repository | https://github.com/DISTREAT/rotkeappchen-rs |
max_upload_size | |
id | 1084407 |
size | 6,379 |
Crate for generating stateless and rotating verification codes, following the Rotkeappchen proposal.
Rotkeappchen verifies email addresses, CAPTCHA challenges, and timed access tokens.
This crate generates time-based codes that are unique for each client:
use rotkeappchen::Rotkeappchen;
let rot = Rotkeappchen::default(b"secret", 60); // 60 seconds
let code = rot.digest("client");
assert!(rot.is_valid("client", |digest| digest == code))