code: public boolean verify(String otp) {
  
          long code = Long.parseLong(otp);
          long currentInterval = clock.getCurrentInterval();
  
          int pastResponse = Math.max(DELAY_WINDOW, 0);
  
          for (int i = pastResponse; i >= 0; --i) {
              int candidate = generate(this.secret, currentInterval - i);
              if (candidate == code) {
                  return true;
              }
          }
          return false;
      }
docs: Verifier - To be used only on the server side
  
  Taken from Google Authenticator with small modifications from
  <a href="http://code.google.com/p/google-authenticator/source/browse/src/com/google/android/apps/authenticator/PasscodeGenerator.java?repo=android#212">PasscodeGenerator.java</a>
  
  Verify a timeout code. The timeout code will be valid for a time
  determined by the interval period and the number of adjacent intervals
  checked.
  
  @param otp Timeout code
  @return True if the timeout code is valid
  
  Author: sweis@google.com (Steve Weis)