Type Definition otp2::Hotp

source ·
pub type Hotp = Otp<Counter>;
Expand description

HMAC-based one-time passcode

Uses a counter to generate the passcode. The counter is incremented after a passcode is generated.

Implementations§

source§

impl Hotp

source

pub fn new(key: String, initial_count: u64, length: u32) -> Self

Get a HOTP generator with the given key, initial count, and which generates passcodes of length.