ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>av资源网在线观看,欧美精品一区二区三区久久,亚洲欧美在线专区http://www.aygfsteel.com/alex/category/14971.html不求多得,只求一å¾? about java,hibernate,spring,design,database,linux,etc. <br/><br/> 最˜q‘关心的内容关键å­?web快速开发方案,建模,workshop studio,Ajax zh-cnTue, 27 Feb 2007 14:41:28 GMTTue, 27 Feb 2007 14:41:28 GMT60[zt]Java加密和数字签å?/title><link>http://www.aygfsteel.com/alex/archive/2006/09/07/68398.html</link><dc:creator>Alex</dc:creator><author>Alex</author><pubDate>Thu, 07 Sep 2006 15:59:00 GMT</pubDate><guid>http://www.aygfsteel.com/alex/archive/2006/09/07/68398.html</guid><wfw:comment>http://www.aygfsteel.com/alex/comments/68398.html</wfw:comment><comments>http://www.aygfsteel.com/alex/archive/2006/09/07/68398.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alex/comments/commentRss/68398.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alex/services/trackbacks/68398.html</trackback:ping><description><![CDATA[ <span id="wmqeeuq" class="f14">本文主要谈一下密码学中的加密和数字签名,以及其在java中如何进行ä‹É用。对密码学有兴趣的伙ä¼ß_¼ŒæŽ¨èçœ? Bruce Schneier的著作:Applied Crypotography。在jdk1.5的发行版本中安全性方面有了很大的改进åQŒä¹Ÿæä¾›äº†å¯¹RSA½Ž—法的直接支持,现在我们从实例入手解决问题(本文 ä»…æ˜¯ä½œäØ“½Ž€å•介¾lï¼‰åQ?<br /><br />  <strong>一、密码学上常用的概念</strong> <br /><br />  1åQ‰æ¶ˆæ¯æ‘˜è¦ï¼š<br /><br />   ˜q™æ˜¯ä¸€¿Uä¸Žæ¶ˆæ¯è®¤è¯ç ç»“合ä‹É用以¼‹®ä¿æ¶ˆæ¯å®Œæ•´æ€§çš„æŠ€æœ¯ã€‚主要ä‹É用单向散列函数算法,可用于检验消息的完整性,和通过散列密码直接以文本åŞ式保存等åQŒç›®å‰? òq¿æ³›ä½¿ç”¨çš„算法有MD4、MD5、SHA-1åQŒjdk1.5对上面都提供了支持,在java中进行消息摘要很½Ž€å•, java.security.MessageDigest提供了一个简易的操作æ–ÒŽ³•åQ?br /><br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />*MessageDigestExample.java<br />*Copyright 2005-2-16<br /></span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.security.MessageDigest;<br /></span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />*单一的消息摘要算法,不ä‹É用密ç ?可以用来å¯ÒŽ˜Žæ–‡æ¶ˆæ¯ï¼ˆå¦‚:密码åQ‰éšè—ä¿å­?br /></span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> MessageDigestExample{<br /> </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> main(String[] args) </span><span style="color: rgb(0, 0, 255);">throws</span><span style="color: rgb(0, 0, 0);"> Exception{<br />  </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(args.length</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">){<br />   System.err.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Usage:java MessageDigestExample text</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />   System.exit(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br />  }<br /><br />  </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] plainText</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">args[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">].getBytes(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">使用getInstance("½Ž—法")来获得消息摘è¦?˜q™é‡Œä½¿ç”¨SHA-1çš?60位算æ³?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  MessageDigest messageDigest</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">MessageDigest.getInstance(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">SHA-1</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">messageDigest.getProvider().getInfo());<br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">开始ä‹É用算æ³?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  messageDigest.update(plainText);<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\nDigest:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">输出½Ž—法˜qç®—¾l“æžœ</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  System.out.println(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(messageDigest.digest(),</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));<br /> }<br />}</span></div><br />  ˜q˜å¯ä»¥é€šè¿‡æ¶ˆæ¯è®¤è¯ç æ¥˜q›è¡ŒåŠ å¯†å®žçŽ°åQŒjavax.crypto.Mac提供了一个解å†Ïx–¹æ¡ˆï¼Œæœ‰å…´­‘£è€…可以参考相关API文档åQŒæœ¬æ–‡åªæ˜¯ç®€å•介¾lä»€ä¹ˆæ˜¯æ‘˜è¦½Ž—法ã€?br /><br />˜q™é‡Œè¡¥å……另一个运用消息摘要的方式加密的例å­?<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> TestEncrypt {<br /><br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> TestEncrypt() {<br />    }<br /><br />    </span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />     * </span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);"> strSrc  :strSrc is a string will be encrypted,<br />     * </span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);"> encName : encName is the algorithm name will be used.<br />     *                encName dafault to "MD5"<br />     * </span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"> String<br />     </span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> String Encrypt(String strSrc, String encName) {<br /><br />        MessageDigest md </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />        String strDes </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br /><br />        </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] bt </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> strSrc.getBytes();<br />        </span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);"> {<br />            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (encName </span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">||</span><span style="color: rgb(0, 0, 0);"> encName.equals(</span><span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">)) {<br />                encName </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">MD5</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />            }<br />            md </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> MessageDigest.getInstance(encName);<br />            md.update(bt);<br />            strDes </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> bytes2Hex(md.digest()); </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">to HexString</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">        }<br />        </span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);"> (NoSuchAlgorithmException e) {<br />            System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Invalid algorithm.</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />            </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />        }<br />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> strDes;<br />    }<br /><br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> String bytes2Hex(</span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] bts) {<br />        String des </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">;<br />        String tmp </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);"> bts.length; i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">) {<br />            tmp </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> (Integer.toHexString(bts[i] </span><span style="color: rgb(0, 0, 0);">&</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0xFF</span><span style="color: rgb(0, 0, 0);">));<br />            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (tmp.length() </span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">) {<br />                des </span><span style="color: rgb(0, 0, 0);">+=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />            }<br />            des </span><span style="color: rgb(0, 0, 0);">+=</span><span style="color: rgb(0, 0, 0);"> tmp;<br />        }<br />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> des;<br />    }<br /><br />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> main(String[]args) {<br />        TestEncrypt te </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> TestEncrypt();<br />        String strSrc </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">可以加密汉字.Oh,and english</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br />        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Source String:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> strSrc);<br />        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Encrypted String:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Use Def:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> te.Encrypt(strSrc, </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">));<br />        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Use MD5:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> te.Encrypt(strSrc, </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">MD5</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));<br />        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Use SHA:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> te.Encrypt(strSrc, </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">SHA-1</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));<br />        System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Use SHA-256:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> te.Encrypt(strSrc, </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">SHA-256</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));<br />    }<br />}</span></div><br />另外åQŒåœ¨javawebparts中的 RequestHelpers里的generateGUIDæ–ÒŽ³•也涉及到了MD5的方法,代码如下:<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> String generateGUID(HttpServletRequest request) {<br /><br />    String out </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">""</span><span style="color: rgb(0, 0, 0);">;<br />    </span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);"> {<br />      </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> Construct a string that is comprised of:<br />      </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> Remote IP Address + Host IP Address + Date (yyyyMMdd) +<br />      </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> Time (hhmmssSSa) + Requested Path + Session ID +<br />      </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> HashCode Of ParameterMap</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">      StringBuffer sb </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> StringBuffer(</span><span style="color: rgb(0, 0, 0);">1024</span><span style="color: rgb(0, 0, 0);">);<br />      sb.append(request.getRemoteAddr());<br />      InetAddress ia </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> InetAddress.getLocalHost();<br />      sb.append(ia.getHostAddress());<br />      sb.append(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> SimpleDateFormat(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">yyyyMMddhhmmssSSa</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">).format(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> Date()));<br />      String path </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> request.getServletPath();<br />      String pathInfo </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> request.getPathInfo();<br />      </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (pathInfo </span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">) {<br />        path </span><span style="color: rgb(0, 0, 0);">+=</span><span style="color: rgb(0, 0, 0);"> pathInfo;<br />      }<br />      sb.append(path);<br />      sb.append(request.getSession(</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">));<br />      sb.append(request.getParameterMap().hashCode());<br />      String str </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> sb.toString();<br />      </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> Now encode the string using an MD5 encryption algorithm.</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">      MessageDigest md </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> MessageDigest.getInstance(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">md5</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />      md.update(str.getBytes());<br />      </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] digest </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> md.digest();<br />      StringBuffer hexStr </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> StringBuffer(</span><span style="color: rgb(0, 0, 0);">1024</span><span style="color: rgb(0, 0, 0);">);<br />      </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">; i </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);"> digest.length; i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">) {<br />        str </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> Integer.toHexString(</span><span style="color: rgb(0, 0, 0);">0xFF</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">&</span><span style="color: rgb(0, 0, 0);"> digest[i]);<br />        </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (str.length() </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">) {<br />          str </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);"> str;<br />        }<br />        hexStr.append(str);<br />      }<br />      out </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> hexStr.toString();<br />    } </span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);"> (NoSuchAlgorithmException nsae) {<br />      log.error(nsae);<br />    } </span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);"> (UnknownHostException uhe) {<br />      log.error(uhe);<br />    }<br />    </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> Return the encrypted string.  It should be unique based on the<br />    </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> components that comprise the plain text string, and should always be<br />    </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 32 characters thanks to the MD5 algorithm.</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> out;<br /><br />  } </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> End generateGUID().</span></div><br /><br />  2åQ‰ç§é’¥åŠ å¯†ï¼š<br /><br />  消息摘要只能‹‚€æŸ¥æ¶ˆæ¯çš„完整性,但是单向的,å¯ÒŽ˜Žæ–‡æ¶ˆæ¯åƈ不能加密åQŒè¦åŠ å¯†æ˜Žæ–‡çš„æ¶ˆæ¯çš„è¯ï¼Œž®Þp¦ä½¿ç”¨å…¶ä»–的算法,要确保机密性,我们需要ä‹É用私钥密码术来交换私有消息ã€?br /><br />  ˜q™ç§æœ€å¥½ç†è§£ï¼Œä½¿ç”¨å¯¹ç§°½Ž—法。比如:A用一个密钥对一个文件加密,而Bè¯Õd–˜q™ä¸ªæ–‡äšg的话åQŒåˆ™éœ€è¦å’ŒA一æ ïLš„密钥åQŒåŒæ–¹å…±äº«ä¸€ä¸ªç§é’¥ï¼ˆè€Œåœ¨web环境下,¿Ué’¥åœ¨ä¼ é€’æ—¶å®ÒŽ˜“被侦听)åQ?br /><br />   使用¿Ué’¥åŠ å¯†çš„è¯åQŒé¦–先需要一个密钥,可用javax.crypto.KeyGenerator产生一个密é’?java.security.Key), 然后传递给一个加密工å…?javax.crypto.Cipher),该工具再使用相应的算法来˜q›è¡ŒåР坆åQŒä¸»è¦å¯¹¿U°ç®—法有åQšDESåQˆå®žé™…密钥只用到56 位)åQŒAESåQˆæ”¯æŒä¸‰¿Uå¯†é’¥é•¿åº¦ï¼š128ã€?92ã€?56位)åQŒé€šå¸¸é¦–å…ˆ128位,其他的还有DESede½{‰ï¼Œjdk1.5¿Uä¹Ÿæä¾›äº†å¯¹å¯¹ç§°½Ž—法的支持, 以下例子使用AES½Ž—法来加密:<br /><br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />*PrivateExmaple.java<br />*Copyright 2005-2-16<br /></span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> javax.crypto.Cipher;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> javax.crypto.KeyGenerator;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.security.Key;<br /><br /></span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />*¿Uéˆ…加密åQŒä¿è¯æ¶ˆæ¯æœºå¯†æ€?br /></span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> PrivateExample{<br /> </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> main(String[] args) </span><span style="color: rgb(0, 0, 255);">throws</span><span style="color: rgb(0, 0, 0);"> Exception{<br />  </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(args.length</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">){<br />   System.err.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Usage:java PrivateExample <text></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />   System.exit(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br />  }<br />  </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] plainText</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">args[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">].getBytes(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">通过KeyGenerator形成一个key</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\nStart generate AES key</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  KeyGenerator keyGen</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">KeyGenerator.getInstance(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">AES</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  keyGen.init(</span><span style="color: rgb(0, 0, 0);">128</span><span style="color: rgb(0, 0, 0);">);<br />  Key key</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">keyGen.generateKey();<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Finish generating DES key</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">获得一个私鈅加密类CipheråQŒECB是加密方式,PKCS5Padding是填充方æ³?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  Cipher cipher</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">Cipher.getInstance(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">AES/ECB/PKCS5Padding</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">cipher.getProvider().getInfo());<br /><br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">使用¿Uéˆ…加密</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\nStart encryption:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  cipher.init(Cipher.ENCRYPT_MODE,key);<br />  </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] cipherText</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">cipher.doFinal(plainText);<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Finish encryption:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  System.out.println(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(cipherText,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));<br /><br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\nStart decryption:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  cipher.init(Cipher.DECRYPT_MODE,key);<br />  </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] newPlainText</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">cipher.doFinal(cipherText);<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Finish decryption:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><br />  System.out.println(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(newPlainText,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));<br /><br /> }<br />}</span></div><br />  3åQ‰å…¬é’¥åŠ å¯†ï¼š<br /><br />   上面提到åQŒç§é’¥åŠ å¯†éœ€è¦ä¸€ä¸ªå…±äº«çš„å¯†é’¥åQŒé‚£ä¹ˆå¦‚何传递密钥呢åQŸweb环境下,直接传递的话很å®ÒŽ˜“被侦听到åQŒå¹¸å¥½æœ‰äº†å…¬é’¥åŠ å¯†çš„å‡ºçŽ°ã€‚å…¬é’¥åŠ å¯†ä¹Ÿå«ä¸å¯¹ç§° 加密åQŒä¸å¯¹ç§°½Ž—法使用一对密钥对åQŒä¸€ä¸ªå…¬é’¥ï¼Œä¸€ä¸ªç§é’¥ï¼Œä½¿ç”¨å…¬é’¥åŠ å¯†çš„æ•°æ®ï¼Œåªæœ‰¿Ué’¥èƒ½è§£å¼€åQˆå¯ç”¨äºŽåР坆åQ‰ï¼›åŒæ—¶åQŒä‹É用私钥加密的数据åQŒåªæœ‰å…¬é’¥èƒ½è§£å¼€ åQˆç­¾åï¼‰ã€‚但是速度很慢åQˆæ¯”¿Ué’¥åР坆æ…?00åˆ?000倍)åQŒå…¬é’¥çš„主要½Ž—法有RSAåQŒè¿˜åŒ…括Blowfish,Diffie-Helman½{‰ï¼Œ jdk1.5¿Uæä¾›äº†å¯¹RSA的支持,是一个改˜q›çš„地方åQ?<br /><br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />*PublicExample.java<br />*Copyright 2005-2-16<br /></span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.security.Key;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> javax.crypto.Cipher;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.security.KeyPairGenerator;<br /></span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);"> java.security.KeyPair;<br /></span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />*一个简单的公鈅加密例子,Cipher¾cÖM‹É用KeyPairGenerator生成的公鈅和¿Uéˆ…<br /></span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> PublicExample{<br /> </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> main(String[] args) </span><span style="color: rgb(0, 0, 255);">throws</span><span style="color: rgb(0, 0, 0);"> Exception{<br />  </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(args.length</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">){<br />   System.err.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Usage:java PublicExample <text></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />   System.exit(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br />  }<br /><br />  </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] plainText</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">args[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">].getBytes(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">构成一个RSA密钥</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\nStart generating RSA key</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  KeyPairGenerator keyGen</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">KeyPairGenerator.getInstance(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">RSA</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  keyGen.initialize(</span><span style="color: rgb(0, 0, 0);">1024</span><span style="color: rgb(0, 0, 0);">);<br />  KeyPair key</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">keyGen.generateKeyPair();<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Finish generating RSA key</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">获得一个RSAçš„Cipher¾c»ï¼Œä½¿ç”¨å…¬éˆ…加密</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  Cipher cipher</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">Cipher.getInstance(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">RSA/ECB/PKCS1Padding</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">cipher.getProvider().getInfo());<br /><br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\nStart encryption</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  cipher.init(Cipher.ENCRYPT_MODE,key.getPublic());<br />  </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] cipherText</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">cipher.doFinal(plainText);<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Finish encryption:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  System.out.println(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(cipherText,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));<br /><br />  </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">使用¿Uéˆ…解密</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\nStart decryption</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  cipher.init(Cipher.DECRYPT_MODE,key.getPrivate());<br />  </span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[] newPlainText</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">cipher.doFinal(cipherText);<br />  System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Finish decryption:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />  System.out.println(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(newPlainText,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">UTF8</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));<br /> }<br />}</span></div><br /></span> <img src ="http://www.aygfsteel.com/alex/aggbug/68398.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alex/" target="_blank">Alex</a> 2006-09-07 23:59 <a href="http://www.aygfsteel.com/alex/archive/2006/09/07/68398.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> Ö÷Õ¾Ö©Öë³ØÄ£°å£º <a href="http://" target="_blank">ÆÜϼÊÐ</a>| <a href="http://" target="_blank">ÎèÑôÏØ</a>| <a href="http://" target="_blank">ÓÀÄêÏØ</a>| <a href="http://" target="_blank">Ñô´ºÊÐ</a>| <a href="http://" target="_blank">ÌïÁÖÏØ</a>| <a href="http://" target="_blank">ãôË®ÏØ</a>| <a href="http://" target="_blank">Äþ½úÏØ</a>| <a href="http://" target="_blank">ÉÛÑôÏØ</a>| <a href="http://" target="_blank">ÀúÊ·</a>| <a href="http://" target="_blank">ãðÑôÏØ</a>| <a href="http://" target="_blank">¸»ÄþÏØ</a>| <a href="http://" target="_blank">¶«·áÏØ</a>| <a href="http://" target="_blank">ÏɾÓÏØ</a>| <a href="http://" target="_blank">»¨Ô«ÏØ</a>| <a href="http://" target="_blank">ÍòÊ¢Çø</a>| <a href="http://" target="_blank">°ÍÀï</a>| <a href="http://" target="_blank">¸ùºÓÊÐ</a>| <a href="http://" target="_blank">ÈÙ²ýÏØ</a>| <a href="http://" target="_blank">ÄÏÖ£ÏØ</a>| <a href="http://" target="_blank">Ê¯ÈªÏØ</a>| <a href="http://" target="_blank">ɽµ¤ÏØ</a>| <a href="http://" target="_blank">ÀÖÖÁÏØ</a>| <a href="http://" target="_blank">ºéÑÅÏØ</a>| <a href="http://" target="_blank">¸ßÇàÏØ</a>| <a href="http://" target="_blank">ÈêÄÏÏØ</a>| <a href="http://" target="_blank">ÎÚÀ­ÌØÇ°Æì</a>| <a href="http://" target="_blank">²©°®ÏØ</a>| <a href="http://" target="_blank">Äþ²¨ÊÐ</a>| <a href="http://" target="_blank">²©Ò°ÏØ</a>| <a href="http://" target="_blank">Ò˾ýÏØ</a>| <a href="http://" target="_blank">ÄÏͨÊÐ</a>| <a href="http://" target="_blank">ʯÚäÏØ</a>| <a href="http://" target="_blank">ÕòêãÏØ</a>| <a href="http://" target="_blank">˼éÊÐ</a>| <a href="http://" target="_blank">Æ«¹ØÏØ</a>| <a href="http://" target="_blank">µÂÇìÏØ</a>| <a href="http://" target="_blank">ÄÎÂüÆì</a>| <a href="http://" target="_blank">ÒÁ½ð»ôÂåÆì</a>| <a href="http://" target="_blank">Õò¿µÏØ</a>| <a href="http://" target="_blank">¤Î÷ÏØ</a>| <a href="http://" target="_blank">н®</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>