当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: public class MD5 { /* * A J
 

 

 ·java版的sha-1    »显示摘要«
    摘要:/** * <b>this java class consists the server side for the wondeful javascript library ´sha1.js´. i wrote it because i basically needed * some cheap client/server login authentication......
 ·自动生成nhibernate配置文件    »显示摘要«
    摘要: 我们在项目中采用了nhibernate作为ermaping的解决方案,目前nhibernate发布了0.300版本,可以参见:nhibernate.sourceforge.net ;可nhibernate目前没有自动的配置生成工具,要一个一个的生成配置文件非常的烦人,通过研究,开发了一个配置生成工具。 在自己的工程项目中引用nhibernateattribute名字空间,该控件实现了:nhibe......


java版的MD5
public class md5 { /* * a java implementation of the rsa data security, inc. md5 message * digest algorithm, as defined in rfc 1321. * based on the javascript implementation of paul johnston * copyright (c) paul johnston 1999 - 2000. * see http://pajhome.org.uk/site/legal.html for details. * java version by thomas weber (orange interactive gmbh) */ /* * 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 >> (j * 8 + 4)) & 0x0f) + hex_chr.charat((num >> (j * 8)) & 0x0f); return str; } /* * convert a string to a sequence of 16-word blocks, stored as an array. * append padding bits and the length, as described in the md5 standard. */ private int[] str2blks_md5(string str) { int nblk = ((str.length() + 8) >> 6) + 1; int[] blks = new int[nblk * 16]; int i = 0; for(i = 0; i < nblk * 16; i++) { blks[i] = 0; } for(i = 0; i < str.length(); i++) { blks[i >> 2] |= str.charat(i) << ((i % 4) * 8); } blks[i >> 2] |= 0
...   下一页
 ·使用 ant 让你愉快编程(2)    »显示摘要«
    摘要: 使用 ant 让你愉快编程(2) 摘要: build_common.xml, common.xml 及 usage.txt 2. 介绍 build_common.xml, common.xml 及 usage.txt . 以下为 build_common.xml 文件内容. <?xml version="1.0" encodin......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE