Function libotp::hotp [−][src]
pub fn hotp(counter: u64, secret: &str, digits: u32) -> Option<u32>
HMAC One Time Password function
Arguments
counter
- A 64-bit counter for HOTPsecret
- A base32 encoded secretdigits
- Desired OTP length in digits. 6+ is recommended.
Notes
This function converts the counter to it's 64 bit little endian representation. If you have other requirements, please use the HOTP struct directly.