如何解密我的哈希密码并找回原始字符串. [英] How to get decrypt my hashed password and get original string back.

查看:214
本文介绍了如何解密我的哈希密码并找回原始字符串.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我们拥有不同的内部应用程序,因此我们需要使用登录凭据.为了维护我们必须将这些凭据信息保存在数据库中的功能,为此我们创建了一个应用程序,在该应用程序中我们将哈希密码与SiteMembershipProvider.ComputeSHA512(password + salt)这种方法,我们计算密码并将其保存在db中.现在的要求是从该哈希密码中获取原始密码,并用于相应的应用程序登录.

As we have different internal applications login credentials with us. As to maintain that we have to save these credentials information in datatbase for that we have created one application in which we uses hash password with SiteMembershipProvider.ComputeSHA512(password + salt) this method we compute password and save it in db.Now requirement is get original password from this hashed password and use for respective application to login.

我该怎么做?请为此指导我.

How can i do that? Kindly Guide me on this.

推荐答案

由于我们拥有不同的内部应用程序,因此我们需要使用登录凭据.为了维护我们必须将这些凭据信息保存在数据库中的功能,为此我们创建了一个应用程序,在该应用程序中我们将哈希密码与SiteMembershipProvider.ComputeSHA512(password + salt)这种方法,我们计算密码并将其保存在db中.现在的要求是从该哈希密码中获取原始密码,并用于相应的应用程序登录.

As we have different internal applications login credentials with us. As to maintain that we have to save these credentials information in datatbase for that we have created one application in which we uses hash password with SiteMembershipProvider.ComputeSHA512(password + salt) this method we compute password and save it in db.Now requirement is get original password from this hashed password and use for respective application to login.

我该怎么做?请为此指导我.

How can i do that? Kindly Guide me on this.

与加密不同,哈希是不可逆的.这意味着您无法从哈希值中获取原始值.http://www.differencebetween.net/technology/software-technology/difference-between-encryption-and-hashing/ 

unlike encryption, hashing is irreversible. That means you cannot get the original value back from the hash value. http://www.differencebetween.net/technology/software-technology/difference-between-encryption-and-hashing/ 

现在,要检查密码,您需要使用相同的salt重做用户输入密码的哈希,然后将用户输入密码的哈希与您存储在数据库中的值进行比较.如果用户输入正确的密码,则两者应该匹配.

Now, to check the password you need to redo the hashing on the user entered password using the same salt, then compare the hash of user entered password with the value you stored in the db. if user entered correct password then both should match. 

如果您有任何疑问或需要更多说明,请告诉我.

Let me know if you have any questions or need more explanation. 

谢谢

Eswar


这篇关于如何解密我的哈希密码并找回原始字符串.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆