对参数做签名<br>
参数签名为对Map参数按照key的顺序排序后拼接为字符串，然后根据提供的签名算法生成签名字符串

@param digestAlgorithm 摘要算法
@param params 参数
@param separator entry之间的连接符
@param keyValueSeparator kv之间的连接符
@param isIgnoreNull 是否忽略null的键和值
@return 签名
@since 4.0.1
502170
public static String signParams(DigestAlgorithm digestAlgorithm, Map<?, ?> params, String separator, String keyValueSeparator, boolean isIgnoreNull) {
		if (MapUtil.isEmpty(params)) {
			return null;
		}
		final String paramsStr = MapUtil.join(MapUtil.sort(params), separator, keyValueSeparator, isIgnoreNull);
		return new Digester(digestAlgorithm).digestHex(paramsStr);
	}
396864
public static function buildQueryString($params, $separator = '&', $key = null)
    {
        $query = '';
        foreach ($params as $k => $v) {
            $k = urlencode($k);
            if (!empty($key)) {
                $k = $key.'['.$k.']';
            }
            if (is_null($v)) {
                continue;
            } elseif (is_array($v)) {
                $query .= call_user_func(array(__CLASS__, __FUNCTION__), $v, $separator, $k).$separator;
            } else {
                if ($v === false) {
                    $v = 0;
                } elseif ($v === true) {
                    $v = '';
                }
                $v = str_replace(array('%2F','%2C','%3A','%7C'), array('/',',',':','|'), urlencode($v));
                $query .= $k.'='.$v.$separator;
            }
        }
        $query = rtrim(str_replace('='.$separator, $separator, $query), $separator);
        return $query;
    }
87161
private static void checkNoConflictInValueBucket(
      Object value, Entry<?, ?> entry, @Nullable ImmutableMapEntry<?, ?> valueBucketHead) {
    for (; valueBucketHead != null; valueBucketHead = valueBucketHead.getNextInValueBucket()) {
      checkNoConflict(!value.equals(valueBucketHead.getValue()), "value", entry, valueBucketHead);
    }
  }
1260452
function isKeyComparator(arg) {
            let result = __getParameterCount(arg) === 2;
            const first = self.first();
            try {
                const key = keySelector(first);
                // if this is a key comparator, it must return truthy values for equal values and falsy ones if they're different
                result = result && arg(key, key) && !arg(key, {});
            }
            catch (err) {
                // if the function throws an error for values, it can't be a keyComparator
                result = false;
            }
            return result;
        }
41764
String getKeyPrefix(StatementPartitioning partitioning, DeterminismMode detMode, String joinOrder) {
        // no caching for inferred yet
        if (partitioning.isInferred()) {
            return null;
        }

        String joinOrderPrefix = "#";
        if (joinOrder != null) {
            joinOrderPrefix += joinOrder;
        }

        boolean partitioned = partitioning.wasSpecifiedAsSingle();

        return joinOrderPrefix + String.valueOf(detMode.toChar()) + (partitioned ? "P#" : "R#");
    }
1369722
static List<String> keyValueString(@Nullable Map<?, ?> keyValueMapping) {
    List<String> result = Lists.newArrayList();
    if (keyValueMapping != null && keyValueMapping.size() > 0) {
      for (Map.Entry<?, ?> entry : keyValueMapping.entrySet()) {
        result.add(entry.getKey() + "=" + entry.getValue());
      }
      Joiner joiner = Joiner.on(",");
      return Collections.singletonList(joiner.join(result));
    }

    return Collections.emptyList();
  }
861746
static String mapEntryToString(Object key, Object val) {
        final String k, v;
        final int klen, vlen;
        final char[] chars =
            new char[(klen = (k = objectToString(key)).length()) +
                     (vlen = (v = objectToString(val)).length()) + 1];
        k.getChars(0, klen, chars, 0);
        chars[klen] = '=';
        v.getChars(0, vlen, chars, klen + 1);
        return new String(chars);
    }
913352
@CheckForNull
  public String getNameOrKeyUpperLikeQuery() {
    return nameOrKeyQuery == null ? null : buildLikeValue(nameOrKeyQuery, BEFORE_AND_AFTER).toUpperCase(Locale.ENGLISH);
  }
1103425
static <K, V> K keyOrNull(final OMVRBTreeEntry<K, V> e) {
    return e == null ? null : e.getKey();
  }
148506
public static <K, V> String join(Map<K, V> map, String separator, String keyValueSeparator, boolean isIgnoreNull) {
		final StringBuilder strBuilder = StrUtil.builder();
		boolean isFirst = true;
		for (Entry<K, V> entry : map.entrySet()) {
			if (false == isIgnoreNull || entry.getKey() != null && entry.getValue() != null) {
				if (isFirst) {
					isFirst = false;
				} else {
					strBuilder.append(separator);
				}
				strBuilder.append(Convert.toStr(entry.getKey())).append(keyValueSeparator).append(Convert.toStr(entry.getValue()));
			}
		}
		return strBuilder.toString();
	}
228386
boolean isHorizontalSeparator() {
    	if (isAttribute(Chunk.SEPARATOR)) {
    		Object[] o = (Object[])getAttribute(Chunk.SEPARATOR);
    		return !((Boolean)o[1]).booleanValue();
    	}
    	return false;
    }
817618
private final CacheEntry internalFilterEntry(String cacheName, InvalidationTableList invalidationTableList, CacheEntry cacheEntry) {
		InvalidateByIdEvent idEvent = null;
		if (cacheEntry == null) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered cacheName=" + cacheName + " CE == NULL");
			}
			return null;
		} else if (cacheEntry.id == null) {		
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered cacheName=" + cacheName + " id == NULL");
			}
		    return null;
		}

		long timeStamp = cacheEntry.getTimeStamp();
		idEvent = (InvalidateByIdEvent) invalidationTableList.presentIdSet.get(cacheEntry.id);
		if ((idEvent != null) && (idEvent.getTimeStamp() > timeStamp)) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered Found a more recent InvalidateByIdEvent for the cacheEntry in presentIdSet. cacheName=" + cacheName + " id=" + cacheEntry.id);
			}
			return null;
		}
		if (collision(invalidationTableList.presentTemplateSet, cacheEntry.getTemplates(), timeStamp) || collision(invalidationTableList.presentIdSet, cacheEntry.getDataIds(), timeStamp)) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered due to preexisting invalidations due to dependencies and templates in present template and IdSet. cacheName=" + cacheName + " id=" + cacheEntry.id);
			}
			return null;
		}
		if (timeStamp > lastTimeCleared) {
			return cacheEntry;
		}
		//else check past values as well
		idEvent = (InvalidateByIdEvent) invalidationTableList.pastIdSet.get(cacheEntry.id);

		if ((idEvent != null) && (idEvent.getTimeStamp() > timeStamp)) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered Found a more recent InvalidateByIdEvent for the cacheEntry in pastIdSet. cacheName=" + cacheName + " id=" + cacheEntry.id);
			}
			return null;
		}
		if (collision(invalidationTableList.pastTemplateSet, cacheEntry.getTemplates(), timeStamp) || collision(invalidationTableList.pastIdSet, cacheEntry.getDataIds(), timeStamp)) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "internalFilterEntry(): Filtered due to preexisting invalidations due to dependencies and templates in past template and IdSet. cacheName=" + cacheName + " id=" + cacheEntry.id);
			}
			return null;
		}
		return cacheEntry;
	}
1213344
private V getValue(InternalCacheEntry<K, V> entry) {
      return isNull(entry) ? null : entry.getValue();
   }
1130720
private RestType _tryConstructKey(TableMetadata tm) {
		for(Filter f : filters)
			if(f.operator==StorageFilter.NOTEQUAL || f.operator==StorageFilter.NOTNULL || f.operator==StorageFilter.NULL ||
			f.operator==StorageFilter.CONTAINS || f.operator==StorageFilter.NOTCONTAINS)
				return RestType.LISTITEMS; //because queryItems do not support notEqual, notNull, null, contains and notContains

		if(tm.getSecondaryKeyName()!=null){
			if(filters.size() == 1){
				Iterator<Filter> itr = filters.iterator();
				Filter f = itr.next(); 
				if(f.itemName.equals(tm.getPrimaryKeyName()) && f.operator == StorageFilter.EQUALS){
					this.key = new LinkedHashMap<String, Object>();
					this.key.put("primary", f.value);
					filters.clear();
					return RestType.QUERYITEMS;
				}			
			} else if (filters.size() == 2) {
				Object tValue = null;
				Filter tFilter = null;
				for(Filter f : filters){
					if(f.itemName.equals(tm.getPrimaryKeyName()) && f.operator == StorageFilter.EQUALS){
						tValue = f.value;
					}
					if(f.itemName.equals(tm.getSecondaryKeyName())){
						tFilter = f;
					}				
				}
				if(tValue!=null && tFilter!=null){
					filters.clear();
					filters.add(tFilter);
					this.key = new LinkedHashMap<String, Object>();
					this.key.put("primary", tValue);
					return RestType.QUERYITEMS;
				} else {
					return RestType.LISTITEMS;				
				}
			}
		} else {			
			if(filters.size()==1){
				Iterator<Filter> itr = filters.iterator();
				Filter f = itr.next(); 
				if(f.itemName.equals(tm.getPrimaryKeyName()) && f.operator == StorageFilter.EQUALS){
					return RestType.GETITEM;
				}
			}
		}
		return RestType.LISTITEMS;
	}
306029
public void hasFirstEntry(@NullableDecl Object key, @NullableDecl Object value) {
    Entry<Object, Object> expectedEntry = Maps.immutableEntry(key, value);
    if (actualAsNavigableMap().isEmpty()) {
      failWithActual("expected to have first entry", expectedEntry);
      return;
    }

    Entry<?, ?> actualFirstEntry = actualAsNavigableMap().firstEntry();
    if (!Objects.equal(actualFirstEntry, expectedEntry)) {
      Object actualFirstKey = actualFirstEntry.getKey();
      if (actualAsNavigableMap().entrySet().contains(expectedEntry)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has first entry <%s>. "
                        + "It does contain this entry, but the first entry is <%s>",
                    actualAsString(), expectedEntry, actualFirstEntry)));
      } else if (Objects.equal(actualFirstKey, key)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has first entry <%s>, the first value is <%s>",
                    actualAsString(), expectedEntry, actualFirstEntry.getValue())));
      } else if (Objects.equal(actualFirstEntry.getValue(), value)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has first entry <%s>, the first key is <%s>",
                    actualAsString(), expectedEntry, actualFirstKey)));
      } else if (actualAsNavigableMap().containsKey(key)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has first entry <%s>. It does contain this key, "
                        + "but the key is mapped to <%s>, and the first entry is <%s>",
                    actualAsString(),
                    expectedEntry,
                    actualAsNavigableMap().get(key),
                    actualFirstEntry)));
      } else if (actualAsNavigableMap().containsValue(value)) {
        Set<Object> keys = new LinkedHashSet<>();
        for (Entry<?, ?> actualEntry : actualAsNavigableMap().entrySet()) {
          if (Objects.equal(actualEntry.getValue(), value)) {
            keys.add(actualEntry.getKey());
          }
        }
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has first entry <%s>. It does contain this value, but the "
                        + "value is mapped from the keys <%s>, and the first entry is <%s>",
                    actualAsString(), expectedEntry, keys, actualFirstEntry)));
      } else {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has first entry <%s>. "
                        + "It does not contain this entry, and the first entry is <%s>",
                    actualAsString(), expectedEntry, actualFirstEntry)));
      }
    }
  }
1260908
static byte []
generateDSDigest(DNSKEYRecord key, int digestid)
{
	MessageDigest digest;
	try {
		switch (digestid) {
		case DSRecord.Digest.SHA1:
			digest = MessageDigest.getInstance("sha-1");
			break;
		case DSRecord.Digest.SHA256:
			digest = MessageDigest.getInstance("sha-256");
			break;
		case DSRecord.Digest.GOST3411:
			digest = MessageDigest.getInstance("GOST3411");
			break;
		case DSRecord.Digest.SHA384:
			digest = MessageDigest.getInstance("sha-384");
			break;
		default:
			throw new IllegalArgumentException(
					"unknown DS digest type " + digestid);
		}
	}
	catch (NoSuchAlgorithmException e) {
		throw new IllegalStateException("no message digest support");
	}
	digest.update(key.getName().toWireCanonical());
	digest.update(key.rdataToWireCanonical());
	return digest.digest();
}
571855
public String getBreadcrumb(MenuEntry actualEntry, String separator) {
		if (null == actualEntry) {
			return "";
		}
		StringBuilder result = new StringBuilder();
		final String sep;
		if (StringUtils.isEmpty(separator)) {
			sep =  DEAULT_BC_SEP;
		} else {
			sep = separator;
		}
		actualEntry.reverseFlattened().collect(toListReversed())
				.forEach(entry -> result.append(entry.getDisplayName()).append(sep));

		String result2 = result.toString();
		result2 = result2.substring(0, result2.lastIndexOf(sep));
		return result2.trim().toString();
	}