1 unstable release
0.1.0 | Dec 30, 2023 |
---|
#7 in #time-based
7KB
111 lines
Rotkeappchen-rs
Crate for generating stateless and rotating verification codes, following the Rotkeappchen proposal.
Rotkeappchen verifies email addresses, CAPTCHA challenges, and timed access tokens.
Example
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))
Dependencies
~1.5MB
~45K SLoC