sql2005 HashBytes 加密函数
时间:2024-01-21 11:28:23
有关函数HashBytes请参考:http://msdn.microsoft.com/en-us/library/ms174415.aspx
在做项目的时候,在sql中使用了hashbytes函数,运用md5算法去加密一密码。代码如下
DECLARE @psw nvarchar(20)
SET @psw = 'admin'
SELECT hashbytes('md5',@psw)
输出结果:0x19A2854144B63A8F7617A6F225019B12 前面的 0x 是16进制的意思。
现在改变一下变量@psw的类型
DECLARE @psw varchar(20)
SET @psw = 'admin'
SELECT hashbytes('md5',@psw)
输出结果:0x21232F297A57A5A743894A0E4A801FC3
数据类型的不同得到了不同结果。
标签:sql2005,HashBytes
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python 网页解析HTMLParse的实例详解
2022-08-29 06:27:25
python如何实现一个刷网页小程序
2022-12-09 15:45:56
![](https://img.aspxhome.com/file/2023/1/109441_0s.jpg)
python中os和sys模块的区别与常用方法总结
2022-05-26 18:04:24
tensorflow基本操作小白快速构建线性回归和分类模型
2022-09-16 17:13:37
![](https://img.aspxhome.com/file/2023/3/92513_0s.png)
奇妙的Javascript图片放大镜
2024-04-30 08:51:22
利用Python自动生成PPT的示例详解
2021-10-16 18:25:08
![](https://img.aspxhome.com/file/2023/6/111856_0s.jpg)
python 3.6.5 安装配置方法图文教程
2021-05-17 01:00:19
![](https://img.aspxhome.com/file/2023/7/117847_0s.png)
tensorflow多维张量计算实例
2022-02-05 00:43:48
![](https://img.aspxhome.com/file/2023/8/70198_0s.jpg)
python 服务器批处理得到PSSM矩阵的问题
2021-05-19 12:21:13
![](https://img.aspxhome.com/file/2023/7/107237_0s.jpg)
本地计算机无法启动Apache故障处理
2023-07-17 13:06:48
使用Python的Flask框架来搭建第一个Web应用程序
2022-12-11 21:46:10
![](https://img.aspxhome.com/file/2023/6/94126_0s.png)
python实现马丁策略回测3000只股票的实例代码
2023-03-02 01:12:29
![](https://img.aspxhome.com/file/2023/3/109503_0s.gif)
python绘图pyecharts+pandas的使用详解
2022-02-03 18:00:44
![](https://img.aspxhome.com/file/2023/9/127089_0s.jpg)
python列表推导式 经典代码
2021-02-28 09:26:00
![](https://img.aspxhome.com/file/2023/4/66404_0s.jpg)
selenium跳过webdriver检测并模拟登录淘宝
2023-06-14 18:22:52
![](https://img.aspxhome.com/file/2023/8/59118_0s.gif)
如何更改 pandas dataframe 中两列的位置
2023-01-06 03:14:23
![](https://img.aspxhome.com/file/2023/3/97083_0s.jpg)
pip安装python库时报Failed building wheel for xxx错误的解决方法
2021-12-12 04:55:53
![](https://img.aspxhome.com/file/2023/0/83820_0s.jpg)
Display SQL Server Login Mode
2024-04-18 10:55:50
sqlserver 存储过程动态参数调用实现代码
2011-10-24 19:41:22
php 模拟get_headers函数的代码示例
2023-09-09 06:16:36