Simple method to calculate checksum

string str = “123456 string 1344”;

 System.Security.Cryptography.MD5CryptoServiceProvider provider = new System.Security.Cryptography.MD5CryptoServiceProvider();

byte[] byteArray = provider.ComputeHash(System.Text.Encoding.UTF8.GetBytes(str)); double d = BitConverter.ToDouble(byteArray, 0); int i = BitConverter.ToInt32(byteArray, 0);

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/5eafd0a2-1fae-437a-aeb1-f3aeca231

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: