Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java ºÍ.netµÄMD5¼ÓÃܲ»Ò»Ñù£¿£¡

ÓÉÓÚ¹¤×÷ÐèÒª£¬ÒªÓÃ.netµÄ³ÌÐòµ÷ÓÃÒ»¸öjava±àдµÄweb service½Ó¿Ú£¬½Ó¿ÚµÄÒ»¸ö²ÎÊýÒªÇómd5·½Ê½¼ÓÃÜ¡£
.netÖеÄmd5¼ÓÃÜÊǺÜÈÝÒ׵ģ¬²ÉÓÃmsdnÖиø³öµÄ·½·¨:
// Hash an input string and return the hash as
// a 32 character hexadecimal string.
static string getMd5Hash(string input)
{
// Create a new instance of the MD5CryptoServiceProvider object.
MD5CryptoServiceProvider md5Hasher = new MD5CryptoServiceProvider();
// Convert the input string to a byte array and compute the hash.
byte[] data = md5Hasher.ComputeHash(Encoding.Default.GetBytes(input));
// Create a new Stringbuilder to collect the bytes
// and create a string.
StringBuilder sBuilder = new StringBuilder();
// Loop through each byte of the hashed data
// and format each one as a hexadecimal string.
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
// Return the hexadecimal string.
return sBuilder.ToString();
}
 
¿ÉÊÇ£¬µ±ÊäÈëµÄ×Ö·û´®ÊÇÖÐÎĵÄʱºò£¬ÎÊÌâ³öÏÖÁË£¬¼ÓÃܳöÀ´µÄ×Ö·û´®²»Ò»Ñù£º
ÊäÈë ¹¤×÷
java 8c87df93416ebdf251bcb6b328ec3c3b
.net 12e709e3a9a82b441b739a5c8ba035de
Ê×ÏÈÏëµ½µÄÊǶÔÖÐÎĵıàÂ뷽ʽ²»Ò»Ñù£¬¿ÉÊÇÎÞÂÛÓÃutf8»¹ÊÇunicode½á¹û¶¼²»Í¬¡£
ÓÃgoogleËÑË÷ “java MD5 Ëã·¨”ÕÒµ½µÄһƪÎÄÕ½âÊÍÁËÎÒµÄÒÉ»ó
http://blog.csdn.net/Peter_K/archive/2007/03/13/1527629.aspx
char[] charArray = inStr.toCharArray();
byte[] byteArray = new byte[charArray.length];
for (int i = 0; i < charArray.length; i++)
byteArray[i] = (byte) charArray[i];
byte[] md5Bytes = md5.digest(byteArray); 
ÔÚ.netÖÐÓÃͬÑùµÄ·½Ê½
private string getMd5Hash(string input)
{
MD5CryptoServiceProvider md5Hasher = new MD5CryptoServiceProvider();
// Convert the input string to a byte array and compute the hash.
char[] temp = input.ToCharArray();


Ïà¹ØÎĵµ£º

java¼Çʱ¾

³ÌÐòûʲôº¬½ðÁ¿£¬¸ßÊÖĪЦ¡£
package first;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
import ......

java½âÎöxmlÎļþËÄÖÖ·½Ê½

1.½éÉÜ
1£©DOM£¨JAXP Crimson½âÎöÆ÷£© 
      DOMÊÇÓÃÓëƽ̨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐÑ°ÕÒÌض¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤×÷¡£ÓÉÓÚËüÊÇ»ùÓ ......

½«JavaÓ¦ÓóÌÐò±¾µØ±àÒëΪEXEµÄ¼¸ÖÖ·½·¨


½«JavaÓ¦ÓóÌÐò±¾µØ±àÒëΪEXEµÄ¼¸ÖÖ·½·¨(ÍƼöʹÓÃJOVEºÍJET)
1. ´Ówww.towerj.com»ñµÃÒ»¸öTowerJ±àÒëÆ÷£¬¸Ã±àÒëÆ÷¿ÉÒÔ½«ÄãµÄCLASSÎļþ
±àÒë³ÉEXEÎļþ¡£
2. ÀûÓÃ΢ÈíµÄSDK-Java 4.0ËùÌṩµÄjexegen.exe´´½¨EXEÎļþ£¬Õâ¸öÈí¼þ¿ÉÒÔ
´Ó΢ÈíµÄÍøÕ¾Ãâ·ÑÏÂÔØ£¬µØÖ·ÈçÏ£º
ht ......

Java±à³ÌÄÇЩʶù7_io

Java±à³ÌÄÇЩʶù84——IO¼ò½é
I/O´¦Àí¼¼ÊõÊÇJavaÓïÑÔÖÐʵÏÖÎļþ²Ù×÷¡¢ÄÚ´æ²Ù×÷¡¢¿ØÖÆ̨ÊäÈëÒÔ¼°ÍøÂç±à³ÌµÄ»ù´¡£¬µ«ÊÇÓÉÓÚI/O¼¼Êõ±¾ÉíµÄÉè¼ÆÔ­Òò£¬Ò²Ê¹µÃI/O´¦Àí¼¼ÊõµÄÄѶȱȽϴó£¬ÐèÒª»¨·Ñ±È½Ï´óµÄ¾«Á¦½øÐÐѧϰ¡£
  11.1 I/O¼ò½é
ÔÚ³ÌÐòÖУ¬ÊäÈëºÍÊä³ö¶¼ÊÇÏà¶ÔÓÚµ±Ç°³ÌÐò¶øÑԵģ¬ÀýÈç´ÓÓ²ÅÌÉ϶ÁÈ¡Ò»¸öÅä ......

Javaϸ½Ú£¨3£©


21   Àà = Óò + ·½·¨
       Óò = Êý¾Ý
       ·½·¨ = ¹¦ÄÜ
22   ÒýÓÃÊý¾ÝÀàÐͱäÁ¿µÄËĸöÊôÐÔ£º¢Ù±äÁ¿Ãû ¢ÚÊý¾ÝÀàÐÍ ¢Û´æ´¢µ¥Ôª ¢Ü±äÁ¿Öµ
23   ÔÚÒýÓÃÊý¾ÝÀàÐͱäÁ¿´æ´¢µ¥ÔªÄÚ´æ·ÅµÄ±äÁ¿ÖµÊÇÒýÓ㬼´Ö¸ÏòÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ