Some times we use this Encryption in Password( because we want to make password as case sensitive,In data base if we store data means, it's not case sensitive, so we want to perform the encryption for provide better security purpose.)
Here I added the MD5 Encryption Program
header files
System.text;
System.security.encryption;
public string encryptpasswordBL(string passwordBO)
{
Byte[] originalBytes;
Byte[] encodedBytes;
string encryptedPwdBL;
MD5 md5 = new MD5CryptoServiceProvider();
originalBytes = ASCIIEncoding.Default.GetBytes(passwordBO);
encodedBytes = md5.ComputeHash(originalBytes);
encryptedPwdBL = BitConverter.ToString(encodedBytes);
return encryptedPwdBL;
}
No comments:
Post a Comment