Skip to main content

generate_code

Function generate_code 

Source
pub fn generate_code(base32_secret: &str) -> SafeResult<String>
Expand description

Compute the current 6-digit TOTP code for the given base32 secret. Uses the current Unix time, 30-second window, SHA1, 6 digits.