[−][src]Function motp::check_otp
pub fn check_otp(code: &str, secret: &str, pin: &str, valid_period: u8) -> bool
Verifies a give otp code according to shared secrets (secret & pin)
code
: the user inputsecret
: the shared secretpin
: the pin, as supposedly inputed by the user on his clientvalid_period
: the length of validity of the token. token will be checked by this half this value in the past & future