zoukankan      html  css  js  c++  java
  • MD5 Library in .NET

          我写的一个.net里面用于md5加密的类。

    using System;
    using System.Security.Cryptography;

    namespace md5
    {
        
    /// <summary>
        
    /// Class1 的摘要说明。
        
    /// </summary>
        public class stringToMD5
        {
            
    public stringToMD5()
            {
                
    //
                
    // TODO: 在此处添加构造函数逻辑
                
    //
            }

            
    public static string makeMD5(string source)
            {
                
    byte[] b=System.Text.Encoding.Default.GetBytes(source);
                b
    =new System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(b);
                
    string ret="";
                
    for(int i=0;i<b.Length;i++)
                    ret
    +=b[i].ToString ("x").PadLeft(2,'0');
                
    return ret;
            }
        }
    }
  • 相关阅读:
    Python操作 RabbitMQ、Redis、Memcache、SQLAlchemy
    Django的ORM操作
    RabbitMQ
    CentOS忘记用户名或者密码解决办法
    VUE-es6
    vue基础之命令
    爬虫框架:scrapy
    爬虫高性能相关
    MongoDB
    Beautifulsoup模块
  • 原文地址:https://www.cnblogs.com/taobataoma/p/733244.html
Copyright © 2011-2022 走看看