当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: /*** <b>This Java Class co
 

 

 ·自动生成nhibernate配置文件    »显示摘要«
    摘要: 我们在项目中采用了nhibernate作为ermaping的解决方案,目前nhibernate发布了0.300版本,可以参见:nhibernate.sourceforge.net ;可nhibernate目前没有自动的配置生成工具,要一个一个的生成配置文件非常的烦人,通过研究,开发了一个配置生成工具。 在自己的工程项目中引用nhibernateattribute名字空间,该控件实现了:nhibe......
 ·使用 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......


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 【程序编程相关:极限编程中的简单设计原则

【推荐阅读:开放源码-SMTP发信客户端 for J

 * some cheap client/server login authentication by the usual key/data system. besides, i got the creeps watching the password 【扩展信息:前进中的Web3D

 * posted unencrypted via http requests. this class makes sure that if your client is using the ´sha1.js´ to encrypt the password

 * with a key sent by the server, you can always repeat the encrypting on the server side (using the same key) and compare the

 * encrypted strings. since anyone who is trapping the http requests can actually send you the same encrypted string, i suggest

 * you use the client´s ip address as the base for the key generation. since ip address spoofing is not a problem, this authentication

 * method is not a very secured solution. if you need a full proof solution use ssl. however, this one, sure beats nothing.

 * feel free to do with it whatever you want</b>

 * <p><b>this class is an abstract class, to make sure you do not create any new instances of it. it does not throw any exceptions and

 * the code is much more ´c´ like than pure object oriented. there are no implemented interfaces and no inheritance in use. in fact, it

 * is written as close as possible to the original javascript code. i did not test tweaking the instance variables but if you do change

 * them, make sure to apply the same change in the ´sha1.js´ library or you won´t get the same encrypted strings.

 * you can call each one of the 6 work methods by using something like: sha1.hex_hmac_sha1("key", "data");

 * they are the only public methods. all are public and static. you have no reason to call the private ones anyway.</p></b>

 * <p>the ´sha1.js´ is a javascript implementation of the secure hash algorithm, sha-1, as defined in fips pub 180-1.

 * javascript version 2.1 copyright paul johnston 2000 - 2002. other contributors to javascript version: greg holt,

 * andrew kepert, ydnar, lostinet distributed under the bsd license</p>

 * <p>see <a href="http://pajhome.org.uk/crypt/md5http://pajhome.org.uk/crypt/md5">http://pajhome.org.uk/crypt/md5</a> for details.</p>

 * <p><b>author: </b>t.n.silverman (c.t.xm - sia riga, lv)   <a href="mailto:tnsilver@ctxm.commailto:tnsilver@ctcm.com">mailto:tnsilver@ctxm.com</a>

 * <br>creation date: (3/27/2004 5:57:00 pm)</p>


...   下一页
 ·使用 ant 让你愉快编程(5)    »显示摘要«
    摘要: 使用 ant 让你愉快编程(5) 摘要: build_tomcat.xml, tomcat.xml 现在介绍一下如何与 tomcat 一起配合工作. java 的程序很大部分都涉及 web, 自己测试时使用 tomcat 还是很方便的, 所以有必要介绍一下. 在 work/common/ 下的 build_tomcat.xml, tomcat.xml 这两个文件是与 t......
» 本期热门文章:

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