Closed tyilo closed 4 years ago
oath::totp_raw_now doesn't zero-pad the result.
oath::totp_raw_now
For example the following code outputs 3406 instead of 003406:
3406
003406
extern crate oath; use oath::{totp_raw_custom_time, HashType}; fn main () { let res = totp_raw_custom_time(b"12345678901234567890", 6, 0, 30, 26*365*24*60*60, &HashType::SHA1); println!("{}", res); }
thanks!
oath::totp_raw_now
doesn't zero-pad the result.For example the following code outputs
3406
instead of003406
: