Obtains the {@hashCode} for the contents of {@code value}.

@param value a {@code Operation} to be signed
@return the {@code HashCode} corresponding to {@code value}
505516
private static HashCode sign(Operation value) {
    Hasher h = Hashing.md5().newHasher();
    h.putString(value.getConsumerId(), StandardCharsets.UTF_8);
    h.putChar('\0');
    h.putString(value.getOperationName(), StandardCharsets.UTF_8);
    h.putChar('\0');
    return Signing.putLabels(h, value.getLabels()).hash();
  }
68133
private String encode(String value) {
    return this.encode.isEncodingRequired() ? UriUtils.encode(value, this.charset) : value;
  }
821318
public static String hexSHA1(String value) {
        try {
            MessageDigest md;
            md = MessageDigest.getInstance("SHA-1");
            md.update(value.getBytes("utf-8"));
            byte[] digest = md.digest();
            return byteToHexString(digest);
        } catch (Exception ex) {
            throw new UnexpectedException(ex);
        }
    }
599238
public StringTag setValue(String value) throws UnsupportedEncodingException {
        if (value != null) {
            this.value = value;
        }
        byte[] bb = this.value.getBytes("UTF-8");
        size = VINT.fromValue(bb.length);
        return this;
    }
81595
public static Integer getAsInteger(Object value) {
		Integer result = null;

		try {
			if (value instanceof String) {
				result = Integer.valueOf((String) value);
			} else if (value instanceof Number) {
				result = ((Number) value).intValue();
			} else {
				result = null;
			}
		} catch (Exception e) {
			result = null;
		}

		return result == null ? 0 : result;
	}
857823
public static AcceptStatus fromValue(int value) {
        AcceptStatus status = VALUES.get(value);
        if (status == null) {
            status = new AcceptStatus(value);
            VALUES.put(value, status);
        }
        return status;
    }
488740
public String decryptValue(final String value) {
        try {
            return decryptValuePropagateExceptions(value);
        } catch (final Exception e) {
            LOGGER.error("Could not decrypt value [{}]", value, e);
        }
        return null;
    }
928331
public static TypeCode toTypeCode(Object value) {
		if (value == null)
			return TypeCode.Unknown;

		return toTypeCode(value.getClass());
	}
844502
@Override
    public String hexSHA1(String value) {
        return String.valueOf(Hex.encodeHex(sha1(value)));
    }
1037744
public T put(final T value) {
		expungeStaleEntries();
		//
		final int hash = value.hashCode();
		int index = (hash & 0x7FFFFFFF) % elementData.length;
		Entry<T> entry = elementData[index];
		while (entry != null && !eq(value, entry.get())) {
			entry = entry.nextInSlot;
		}

		if (entry == null) {
			if (++elementCount > threshold) {
				expandElementArray(elementData.length);
				index = (hash & 0x7FFFFFFF) % elementData.length;
			}
			entry = createHashedEntry(value, index);
			return null;
		}

		final T result = entry.get();
		return result;
	}
783712
public static BigInteger read(String value) {
		if (!StringUtils.hasText(value)) return null;
		
		return new BigInteger(value);
	}
567159
public static AckErrorCode of(String value) {
        return value == null ? null : new AckErrorCode(Values.fromValue(value), value);
    }
1102917
public static String toUnicodeHex(int value) {
		final StringBuilder builder = new StringBuilder(6);

		builder.append("\\u");
		String hex = toHex(value);
		int len = hex.length();
		if (len < 4) {
			builder.append("0000", 0, 4 - len);// 不足4位补0
		}
		builder.append(hex);

		return builder.toString();
	}
1059058
public Expression<String> contains(String value) {
		String valueString = "'%" + value + "%'";
		return new Expression<String>(this, Operation.like, valueString);
	}
1166075
private Set<String> parseValueList(String value) {

        if (value.charAt(0) == '(') {
            value = value.substring(1);
        }
        int len = value.length() - 1;
        if (value.charAt(len) == ')') {
            value = value.substring(0, len);
        }
        if (value.charAt(len - 1) == ',') {
            value = value.substring(0, len - 1);
        }
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHEKEY_PARSE_VALUES_1, value));
        }
        List<String> tokens = CmsStringUtil.splitAsList(value, ',', true);
        Set<String> result = new HashSet<String>();
        result.addAll(tokens);
        return result;
    }
87592
public static String toReadablePluralLabel(String value) {
        String label = toReadableLabel(value);
        return label.endsWith("ss") ? label.substring(0, label.length() - 1) : label;
    }
1282552
public static String decodeToStr(String value) {
        byte[] decodedValue = delegate.decode(value);
        return new String(decodedValue, UTF_8);
    }