rotkeappchen

Crates.iorotkeappchen
lib.rsrotkeappchen
version0.1.0
sourcesrc
created_at2023-12-30 20:29:33.310646
updated_at2023-12-30 20:29:33.310646
descriptionCrate for generating stateless and rotating verification codes.
homepage
repositoryhttps://github.com/DISTREAT/rotkeappchen-rs
max_upload_size
id1084407
size6,379
(DISTREAT)

documentation

README

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))
Commit count: 6

cargo fmt