MySQL 如何在mysql查询中解密md5数据?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7763964/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to decrypt a md5 data in mysql query?
提问by developer
Possible Duplicate:
Is it possible to decrypt md5 hashes?
可能的重复:
是否可以解密 md5 哈希?
I have a table which is having md5 encrypted data in it. I have to copy that data in another table but in decrypted form. How can i do that in mysql query??
我有一个表,其中包含 md5 加密数据。我必须将该数据复制到另一个表中,但以解密形式复制。我怎样才能在 mysql 查询中做到这一点?
回答by Jon Skeet
MD5 is not a reversible encryption algorithm. It's a one-way hash. The aim of a hash is to allow you to verify (with some degree of uncertainty) whether someone had the same original information as was used to create the hash. It does notallow you to get back from the hash to the original information.
MD5 不是可逆加密算法。这是一种单向哈希。散列的目的是让您验证(有一定程度的不确定性)某人是否拥有与用于创建散列相同的原始信息。它不是让你从散列回到原来的信息。
回答by Karthi
You cannot decrypt an md5 hashed string, since it is a one way algorithm. But they can be converted using reverse lookup using mysql. You can refer various online decrypts to find a best solution.
您无法解密 md5 散列字符串,因为它是一种单向算法。但是它们可以使用 mysql 使用反向查找进行转换。您可以参考各种在线解密来找到最佳解决方案。
回答by cambraca
MD5, as others have said here, is not reversible. Having said that, there are databases that contain sort of dictionaries to allow reverse lookup on MD5 hashes.
正如其他人在这里所说的,MD5 是不可逆的。话虽如此,有些数据库包含某种字典以允许对 MD5 哈希进行反向查找。
Check it out: http://tools.benramsey.com/md5/
检查一下:http: //tools.benramsey.com/md5/
More info here.
更多信息在这里。
回答by xdazz
NO, md5 data can not be decrypted.
NO,md5 数据无法解密。
回答by Marco Johannesen
If you decrypt the data from MysQL what would be the point of crypting it? You can only compare to a MD5 password with uncrypted data.
如果您从 MySQL 解密数据,那么加密它的意义何在?您只能与具有未加密数据的 MD5 密码进行比较。
You can ofcourse crack the MD5, read http://alan.blog-city.com/cracking_mysqls_md5_function__within_seconds.htm
你当然可以破解MD5,阅读http://alan.blog-city.com/cracking_mysqls_md5_function__within_seconds.htm
But you kinda missed the whole point of encrypting your password :/
但是您有点错过了加密密码的全部意义:/
回答by yoprogramo
No,
不,
MD5 is a HASH algorithm so, it is not possible to decrypt. To test if some value is correct, you compare the MD5(value) to stored MD5, but it is impossible to extract the original value from MD5.
MD5 是一种 HASH 算法,因此无法解密。要测试某个值是否正确,您可以将 MD5(value) 与存储的 MD5 进行比较,但无法从 MD5 中提取原始值。