[My ASP.NET Learning History] Simple encryption method for call class library library
Source: Unknown Author: Unknown Recommended rating: Visits: 23
ASP.NET comes with an MD5 and SHA1 encryption class libraries! Below is two encryption methods to call this class: =============================== PUBLIC STRING GETMD5 (STRING STRDATA) {// Using MD5 encryption method: system. Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider (); byte [] md5Bytes = System.Text.Encoding.Default.GetBytes (strData); byte [] cryString = md5.ComputeHash (md5Bytes); string md5Str = string.empty; for (int i = 0; i