zoukankan      html  css  js  c++  java
  • C#中 MD5加密

    1. //第一种加密
    2. string str = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile("密码""MD5");
    3. //第二种加密
    4. //引入命名空间
    5. using System.Text;
    6. using System.Security.Cryptography;
    7. MD5 md5 = MD5CryptoServiceProvider.Create();
    8. byte[] data = Encoding.UTF8.GetBytes("密码");
    9. byte[] newdata = md5.ComputeHash(data);
    10. string str = BitConverter.ToString(newdata);
  • 相关阅读:
    linux sed命令详解
    SQL注入基础知识
    DC-7
    DC-6
    DC-5
    DC-4
    DC-3
    DC-2
    pentestlabs
    任意文件读取和下载
  • 原文地址:https://www.cnblogs.com/liehuo123/p/5562267.html
Copyright © 2011-2022 走看看