`
hao0610
  • 浏览: 127474 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论
文章列表
使用java.security.MessageDigest类来实现MD5、SHA加密,代码如下: import java.security.MessageDigest; public class MD5AndSHA { public final static String MD5_SHA(String s) { char hexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; try { byte[] str ...
MD5 算法源码(Java版): public class MD5 { /* * Convert a 32-bit number to a hex string with ls-byte first */ String hex_chr = "0123456789abcdef"; private String rhex(int num) { String str = ""; for (int j = 0; j <= 3; j++) str = str + hex_chr.charAt((num > ...
myXml.xml: <?xml version="1.0" encoding="utf-8"?> <novel label="单元"> <part label="第一单元"> <part label="第一单元例题一"> <part label="练习题一" ></part> <part label=& ...
Global site tag (gtag.js) - Google Analytics