public void TOTP_IsValid_out_of_sync_clocks() { var result = TOTP.GenerateCode(); Assert.IsTrue(TOTP.IsValid(result.Code, result.Secret, DateTime.UtcNow.AddSeconds(-32), 90)); }
public void TOTP_IsValid_fails() { var result = TOTP.GenerateCode(); Assert.IsFalse(TOTP.IsValid(result.Code, result.Secret, DateTime.UtcNow.AddSeconds(300), 90)); }