博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C#帮助类:MD5加密
阅读量:7286 次
发布时间:2019-06-30

本文共 789 字,大约阅读时间需要 2 分钟。

1     ///  2     /// MD5加密 3     ///  4     public class Md5 5     { 6         ///  7         /// MD5加密 8         ///  9         /// 加密字符10         /// 加密位数16/3211         /// 
12 public static string md5(string str, int code)13 {14 string strEncrypt = string.Empty;15 if (code == 16)16 {17 strEncrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").Substring(8, 16);18 }19 20 if (code == 32)21 {22 strEncrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5");23 }24 25 return strEncrypt;26 }27 }

 

转载于:https://www.cnblogs.com/qinyi173/p/10222909.html

你可能感兴趣的文章
Python中time模块详解
查看>>
java 的模板方式设计模式
查看>>
跳转到servlet出现java.lang.InstantiationException:
查看>>
RedHat7 配置VNCServer
查看>>
git 回滚版本
查看>>
Nginx反向代理实现会话(session)保持的两种方式
查看>>
Nginx配置指令location匹配符优先级和安全问题
查看>>
sc create 创建启动服务带参数 目录不能有空格
查看>>
Glusterfs初体验
查看>>
Centos搭建SVN服务器三步曲
查看>>
NC-ERP IUFO系统管理要点
查看>>
linux下将文件设置为swap
查看>>
jquery filter()方法
查看>>
make和makefile
查看>>
eclipse git 强制覆盖本地文件
查看>>
elasticsearch查询关键字slop
查看>>
[Unity3d]Player Settings导出设置
查看>>
Python成长之路第一篇(2)-初识列表和元组
查看>>
Docker EE/Docker CE简介与版本规划
查看>>
python 读取excel中的数据
查看>>