md5加密</br>

@praram str 需要进行md5加密的字符
@return 已进行md5的加密的字符
326569
public static String md5(String str) {
		String md5 = encode(str, "MD5").toLowerCase();
		return md5;
	}
22383
public static String getHashMD5(String str) {
        try {
            return getHash(str, "MD5");
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        }
    }
763391
public static String md5(String s) {
        try {
            MessageDigest md5 = MessageDigest.getInstance("MD5");
            byte[] digest = md5.digest(s.getBytes(Charset.forName("UTF-8")));
            StringBuilder buf = new StringBuilder(2 * digest.length);
            for (byte oneByte : digest) {
                buf.append(Integer.toHexString((oneByte & 0xFF) | 0x100).substring(1, 3));
            }
            return buf.toString();
        } catch (NoSuchAlgorithmException ignore) { }
        return s;
    }
1063350
func Md5(str string) string {
	m := md5.New()
	io.WriteString(m, str)
	return fmt.Sprintf("%x", m.Sum(nil))
}
1206847
public static String getFileMD5String(File file) throws IOException {
        MessageDigest messageDigest = getMessageDigest(MD5);
        return getFileHashString(file, messageDigest);
    }
1534
def md5(source):
    
    # fix passing char '+' from source
    source = source.replace("%2B", "+")
    with open(source) as file_to_check:
        data = file_to_check.read()
        return hashlib.md5(data).hexdigest()
752893
public function create()
    {
        $string = join('&', array_map(function ($item) {
            return md5($item);
        }, $this->toArray()));

        return strtoupper(md5($string));
    }
538534
def get_md5(string):
    """"""
    try:
        hasher = hashlib.md5()
    except BaseException:
        hasher = hashlib.new('md5', usedForSecurity=False)
    hasher.update(string)
    return hasher.hexdigest()
787638
public static PublicKey loadPublicKey(String publicKeyStr) throws Exception {
		try {
			byte[] buffer = base64.decode(publicKeyStr);
			KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
			X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer);
			return (RSAPublicKey) keyFactory.generatePublic(keySpec);
		} catch (NoSuchAlgorithmException e) {
			throw new Exception("无此算法");
		} catch (InvalidKeySpecException e) {
			throw new Exception("公钥非法");
		} catch (NullPointerException e) {
			throw new Exception("公钥数据为空");
		}
	}
1022303
function md5cmn(q, a, b, x, s, t) {
    return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)
}
677645
public ByteBuffer append(String str) {
        if (str != null)
            return append(DocWriter.getISOBytes(str));
        return this;
    }
464587
public String str()
  {
    if(null == m_strCache)
      m_strCache = new String((char[])m_obj, m_start, m_length);
    
    return m_strCache;
  }
662900
public static String add( String str, String str2 ) {
        return FastStringUtils.noCopyStringFromChars(
                Chr.add(
                 FastStringUtils.toCharArray(str),
                 FastStringUtils.toCharArray(str2) )
        );
    }
679545
static String md5(String input) {
    if (input == null || input.length() == 0) {
      throw new IllegalArgumentException("Input string must not be blank.");
    }
    try {
      MessageDigest algorithm = MessageDigest.getInstance("MD5");
      algorithm.reset();
      algorithm.update(input.getBytes());
      byte[] messageDigest = algorithm.digest();

      StringBuilder hexString = new StringBuilder();
      for (byte messageByte : messageDigest) {
        hexString.append(Integer.toHexString((messageByte & 0xFF) | 0x100).substring(1, 3));
      }
      return hexString.toString();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
652176
public static Map<String, String> parseQString(String str) {

		Map<String, String> map = new HashMap<String, String>();
		int len = str.length();
		StringBuilder temp = new StringBuilder();
		char curChar;
		String key = null;
		boolean isKey = true;
		boolean isOpen = false;//值里有嵌套
		char openName = 0;
		if(len>0){
			for (int i = 0; i < len; i++) {// 遍历整个带解析的字符串
				curChar = str.charAt(i);// 取当前字符
				if (isKey) {// 如果当前生成的是key
					
					if (curChar == '=') {// 如果读取到=分隔符 
						key = temp.toString();
						temp.setLength(0);
						isKey = false;
					} else {
						temp.append(curChar);
					}
				} else  {// 如果当前生成的是value
					if(isOpen){
						if(curChar == openName){
							isOpen = false;
						}
						
					}else{//如果没开启嵌套
						if(curChar == '{'){//如果碰到，就开启嵌套
							isOpen = true;
							openName ='}';
						}
						if(curChar == '['){
							isOpen = true;
							openName =']';
						}
					}
					
					if (curChar == '&' && !isOpen) {// 如果读取到&分割符,同时这个分割符不是值域，这时将map里添加
						putKeyValueToMap(temp, isKey, key, map);
						temp.setLength(0);
						isKey = true;
					} else {
						temp.append(curChar);
					}
				}
				
			}
			putKeyValueToMap(temp, isKey, key, map);
		}
		return map;
	}
290405
public static MD5Digest fromBytes(byte[] md5Bytes)
  {
    Preconditions.checkArgument(md5Bytes.length == MD5_BYTES_LENGTH,
        "md5 bytes must be " + MD5_BYTES_LENGTH + " bytes in length, found " + md5Bytes.length + " bytes.");
    String md5String = Hex.encodeHexString(md5Bytes);
    return new MD5Digest(md5String, md5Bytes);
  }
825503
function getHash(str, algorithm) {
  algorithm = algorithm || 'md5';
  var hash = crypto.createHash(algorithm);
  hash.end(str);
  return hash.read();
}