code: public boolean isValid(byte[] key, long timeStep, int digits, HmacShaAlgorithm hmacShaAlgorithm, String value, long validationTime) {
          boolean result = false;
          TOTPBuilder builder = TOTP.key(key).timeStep(timeStep).digits(digits).hmacSha(hmacShaAlgorithm);
          for (int i = -window; i <= window; i++) {
              final long time = validationTime + (i * timeStep);
              final TOTP vtotp = builder.build(time);
              if (vtotp.value().equals(value)) {
                  result = true;
                  break;
              }
          }
          return result;
      }
docs: Returns {@code true} if the specified TOTP {@code value} matches the
  value of the TOTP generated at validation, otherwise {@code false}.
  
  @param key
  the encoded shared secret key
  @param timeStep
  the time step size in milliseconds
  @param digits
  the number of digits a TOTP should contain
  @param hmacShaAlgorithm
  {@link HmacShaAlgorithm}
  @param value
  the TOTP value to validate
  @param validationTime
  the validation reference time in milliseconds
  
  @return {@code true} if the specified TOTP {@code code} value matches the
  code value of the TOTP generated at validation, otherwise
  {@code false}.