VB.Net 中的 SHA1 解密
是否可以在知道密钥的情况下解密 VB.Net 中的 SHA1 字符串?
然而,我以前见过凭证的“解密” - 在Java中: http://pastebin.com/P0LuN00P
Is it possible to decrypt a SHA1 string in VB.Net, knowing the key?
I have seen "decryption" of credentials before, however - in Java: http://pastebin.com/P0LuN00P
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
SHA1 的全部意义就是让这成为不可能。
然而,SHA1 有一些弱点,这使得这不太可能。
您应该使用 SHA512 使其变得更加不可能。
您可能正在寻找 Rijndael,一种(好的)对称加密算法。
The entire point of SHA1 is to make this impossible.
However, SHA1 has weaknesses which make this less impossible.
You should use SHA512 to make it more impossible.
You might be looking for Rijndael, a (good) symmetric encryption algorithm.
我认为你弄错了 SHA1。
SHA1 不是加密算法,它是哈希函数。
哈希函数是一种采用一些无条件长参数字符串并将该字符串转换为更小的字符串(称为哈希)的函数。从哈希值获取用于生成哈希值的字符串非常困难。实际上,由于输入是任意长的,因此有多个这样的输入给出相同的哈希值。两个这样的输入称为冲突。因此,您确实无法“解密”哈希值,但您可以找到给出相同哈希值的输入。
通常使用散列函数对用户密码进行散列,并将其存储在服务器上的数据库中。当用户向服务器提供密码时,服务器会通过检查对密码进行哈希处理得出的结果是否与数据库中存储的结果相同来检查密码是否正确。
如果恶意用户获取数据库中存储的内容,他将无法知道实际密码,因为很难从哈希值转换为用于生成哈希值的字符串。
I think you got SHA1 wrong.
SHA1 is not an encryption algorithm, it is a hash function.
A hash function is a function taking some unconditionally long argument string and transform that string to a much smaller string, called the hash. It is very hard to get from a hash to the string used to generate the hash. Actually, since the input are arbitrarily long, there are multiple such inputs that give the same hash. Two such inputs are called collisions. Therefore you really cant "decrypt" a hash, you can find a input which gives the same hash though.
Commonly hashing functions are used to hash a user password, store it in a database on the server. When the server is supplied a password from a user, the server checks to see if the password is correct by checking that hashing the password gives the same result as stored in the database.
If a malicious user grabs what is stored in the database, he is unable to know the actual password since it is very hard to go from hash to the string used to generate the hash.
SHA1 不是加密的,而是经过哈希处理的。所以不,不可能解密它。您可以尝试彩虹表:http://www.freerainbowtables.com/
SHA1 isn't encrypted, it's hashed. So no, it's not possible to decrypt it. You might try a Rainbow Tables: http://www.freerainbowtables.com/