码迷,mamicode.com
首页 > 其他好文 > 详细

原创:MD5 32位加密软件

时间:2014-08-20 23:54:33      阅读:333      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   使用   os   io   数据   

网站后台数据库切勿使用明文保存密码,否则一旦黑客拿下你的Webshell,后果不堪设想。

网站后台密码加密大多数采用的就是MD5算法加密。
今天给大家送一个本人用c#简单编写的MD5 32位加密程序,虽然没有什么技术含量,但保证没有后门。

程序截图:

bubuko.com,布布扣

开放源码如下:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;

namespace MD5加密程序
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string s = textBox1.Text;
            textBox2.Text= GetMD5(s);

            
        }
        public static string GetMD5(string str)
        {
            MD5 md5 = MD5.Create();
            byte[] buffer = Encoding.Default.GetBytes(str);
            byte[] MD5buffer = md5.ComputeHash(buffer);
            string strnew = "";
            for (int i = 0; i < MD5buffer.Length; i++)
            {
                strnew += MD5buffer[i].ToString("x2");
            }
            return strnew;
        }

        private void label3_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.cnblogs.com/xingyunblog/");
        }


        private void label4_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://bbs.hx95.com/index.php"); 
        }

    }
}

软件下载地址

链接:http://pan.baidu.com/s/1kTzacFt 密码:0goe

原创:MD5 32位加密软件,布布扣,bubuko.com

原创:MD5 32位加密软件

标签:style   blog   http   color   使用   os   io   数据   

原文地址:http://www.cnblogs.com/xingyunblog/p/3925882.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!