- FunctionGetMd5Hash(ByValinputAsString,ByValcodaAsInteger)AsString
- Dimmd5HasherAsNewMD5CryptoServiceProvider()
- DimdataAsByte()=md5Hasher.ComputeHash(Encoding.Default.GetBytes(input))
- DimsBuilderAsNewStringBuilder()
- DimiAsInteger
- Ifcoda=16Then
- Fori=4To11
- sBuilder.Append(data(i).ToString("x2"))
- Nexti
- Else'32位
- Fori=0To15
- sBuilder.Append(data(i).ToString("x2"))
- Nexti
- EndIf
- ReturnsBuilder.ToString()
- EndFunction