Skip to main content

generate_code

Function generate_code 

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

Compute the current TOTP code for a raw base32 secret or otpauth:// URI.

Raw base32 input uses the common SHA1 / 6 digits / 30 seconds profile. otpauth:// input honors algorithm, digits, and period query parameters, defaulting omitted values to SHA1 / 6 / 30.