public bool Verify(int otp) { long timeStamp = new Unixtime().ToTimeStamp(); long numberOfIntervals = this.NumberOfIntervals(timeStamp); for (int i = 0; i < PasswordValidIntervals; i++) { if (this.GenerateOTP(numberOfIntervals - i) == otp) { return(true); } } return(false); }
public bool Verify(int otp) { long timeStamp = new Unixtime().ToTimeStamp(); long numberOfIntervals = this.NumberOfIntervals(timeStamp); for (int i = 0; i < PasswordValidIntervals; i++) { if (this.GenerateOTP(numberOfIntervals - i) == otp) { return true; } } return false; }