code: public static boolean fixedTimeEqual(String lhs, String rhs) {
  		
  		boolean equal = (lhs.length() == rhs.length() ? true : false);
  		
  		// If not equal, work on a single operand to have same length.
  		if(!equal) {
  			rhs = lhs;
  		}
  		int len = lhs.length();
  		for(int i=0;i<len;i++) {
  			if(lhs.charAt(i) == rhs.charAt(i)) {
  				equal = equal && true;
  			} else {
  				equal = equal && false;
  			}
  		}
  		
  		return equal;
  	}
docs: Fixed time comparison of two strings.
  
  Fixed time comparison is necessary in order to prevent attacks analyzing differences in
  verification time for corrupted tokens.
  
  @param lhs Left hand side operand
  @param rhs Right hadn side operand
  @return true if the strings are equal, false otherwise.