I am using the following code for charater encoding of unicode charater. It is giving me the different string value of MD5EncryptedString when I use the value of the DataToEncrypt as 'abc' & 'ABC'
String DataToEncrypt="abc";
String MD5EncryptedString = String.Empty;
MD5 md5 = new MD5CryptoServiceProvider();
Byte[] encodedBytes = ASCIIEncoding.Default.GetBytes(DataToEncrypt);
// Byte[] encodedBytes = UTF8Encoding.Default.GetBytes(DataToEncrypt);
encodedBytes = md5.ComputeHash(encodedBytes);
MD5EncryptedString = BitConverter.ToString(encodedBytes);
return MD5EncryptedString;
Is there any class instead of the ASCIIEncoding which will give me the case insensitive string means it will give me the value of the MD5EncryptedString same for both the 'abc' & 'ABC' for the DataToEncrypt variable ?