.NET中:
string 有产生HashCode的方法
System.Security.Cryptography类库中有有产生MD5码等从128bit到512bit的若干个产生校验码的方法产生MD5:
public void Main()
{
string str = "中国人"
MD5 md5 = new MD5CryptoServiceProvider();
byte[] byteStr = new byte[Encoding.Unicode.GetByteCount(str)];
byteStr = Encoding.Unicode.GetBytes(str);
byte[] md5code = md5.ComputeHash(byteStr);string MD5Code = "";
for (int i = 0; i<md5code.Length;i++)
    MD5Code += ByteToCharString(md5code[i]);MessageBox.Show(MD5Code, "MD5");}private string ByteToCharString(byte b)
{
string hexNum = "0123456789ABCDEF";
return hexNum.Substring(b >> 4, 1) + hexNum.Substring((b & 0x0F), 1);
}