文件名称:MD5加密解密的例子
文件大小:2KB
文件格式:RAR
更新时间:2014-02-14 10:09:25
MD5 加密 MD5解密
private static final String HEX_NUMS_STR="0123456789ABCDEF"; private static final Integer SALT_LENGTH = 12; /** * 将16进制字符串转换成字节数组 * @param hex * @return */ public static byte[] hexStringToByte(String hex) { int len = (hex.length() / 2); byte[] result = new byte[len]; char[] hexChars = hex.toCharArray(); for (int i = 0; i < len; i++) { int pos = i * 2; result[i] = (byte) (HEX_NUMS_STR.indexOf(hexChars[pos]) << 4 | HEX_NUMS_STR.indexOf(hexChars[pos + 1])); } return result; } ....................... ......................... .........................
【文件预览】:
MyMD5Util.java
Client.java