hashLength = 32;
data = Encoding.Default.GetBytes(
MD5 md5 = new MD5CryptoServiceProvider()
enc = md5.TransformFinalBlock(da
foreach(byte b in md5.Hash)
hash += Convert.ToString(b, 16).ToUpper().PadLeft(2, '0');
md5.Clear();
Main Topics
Browse All Topics





by: NipNFriar_TuckPosted on 2004-09-24 at 07:38:43ID: 12143647
If I understand what you are asking for this should do the trick...
hy
str);
;
result, 0, result.Length);
using System.Security.Cryptograp
public string EncryptString( string str ) {
string rStr
try {
byte[] data = Encoding.Default.GetBytes(
// This is one implementation of the abstract class MD5.
MD5 md5 = new MD5CryptoServiceProvider()
byte[] result = md5.ComputeHash(data);
char[] chars = Encoding.Default.GetChars(
rStr = new string(chars);
} catch ( Exception ex ) {
// do something with the exception!
}
return rStr;
}