问题描述
我在 sql server 2000 中有这个查询:
select pwdencrypt('AAAA')输出一个加密的AAAA"字符串:
<前>0x0100CF465B7B12625EF019E157120D58DD46569AC7BF4118455D12625EF019E157120D58DD46569AC7BF4118455D如何从其来源(即AAAA")转换(解密)输出?
我相信 pwdencrypt 正在使用散列,因此您无法真正反转散列的字符串 - 该算法的设计是不可能的.
如果您要验证用户输入的密码,通常的技术是对其进行散列,然后将其与数据库中的散列版本进行比较.
这是验证用户输入表的方法
SELECT password_field FROM mytable WHERE password_field=pwdencrypt(userEnteredValue)用(大惊喜)用户输入的值替换 userEnteredValue :)
I have this query in sql server 2000:
select pwdencrypt('AAAA')
which outputs an encrypted string of 'AAAA':
0x0100CF465B7B12625EF019E157120D58DD46569AC7BF4118455D12625EF019E157120D58DD46569AC7BF4118455D
How can I convert (decrypt) the output from its origin (which is 'AAAA')?
I believe pwdencrypt is using a hash so you cannot really reverse the hashed string - the algorithm is designed so it's impossible.
If you are verifying the password that a user entered the usual technique is to hash it and then compare it to the hashed version in the database.
This is how you could verify a usered entered table
SELECT password_field FROM mytable WHERE password_field=pwdencrypt(userEnteredValue)
Replace userEnteredValue with (big surprise) the value that the user entered :)
这篇关于如何从 SQL Server 解密密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)