Function nyx::verify

source ·
pub fn verify(key: impl AsRef<[u8]>, secs: u64, token: u32) -> bool
Expand description

Function for verifying TOTP tokens.

This will expect a 6 digits token, and use a skew of 1 and step size of 30.

assert!(nyx::verify("12345678901234567890", 59, 287082));