pub fn hotp<S: Secret, C: Counter>(
secret: S,
counter: C,
digits: u8
) -> Result<u32>
Computes an HOTP code of the desired length given a secret and counter value.
Unlike raw_hotp
, this function truncates the computed value to a given length.
This function will return an error if the given key resolves to fewer than 128 bits or if !((6..=8).contains(digits))
.