[My ASP.NET Learning History] Simple encryption method for call class library library

xiaoxiao2021-03-06  44

[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

转载请注明原文地址:https://www.9cbs.com/read-70374.html

New Post(0)