/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package test.util; /** * * @author Administrator */ public class StringUtil { public StringUtil() { } /** * 将指定byte数组以16进制的形式打印到控制台 * @param hint String…
最近在做文本处理,使用MD5 生成一段文字的MD5哈希长度为32位也即128个0-1序列. 由于需要对这个MD5值进行循环移位,显然普通的 int 是不行的,所以使用 BigInteger.但是在使用BigInteger进行移位的过程,生成的0-1 序列长度 莫名其妙的减少.如图: 生成MD5 哈希码代码如下: public class MD5 { public final static String MD5(String s){ char hexDigits[]={'0','1','2','…