This example demonstrates how to use MD5 add secret using Asp.Net2.0 and C#.Net

This example demonstrates how to use MD5 add secret.

First, you will need to import the System.Collections.Cryptography and System.Collections.Text namespace.

The System.Security.Cryptography namespace provides cryptographic services, including secure encoding and decoding of data, as well as many other operations, such as hashing, random number generation, and message authentication.

The System.Text namespace contains classes representing ASCII, Unicode, UTF-7, and UTF-8 character encodings; abstract base classes for converting blocks of characters to and from blocks of bytes; and a helper class that manipulates and formats string objects without creating intermediate instances of String.

We use the Md5AddSecret Function to do the work.

The front end Md5AddSecretCsharp2005.aspx page looks something like this:

The flow for the code behind page is as follows.

Download Source Files