如何反转MD5以获得原始字符串? [英] How to reverse MD5 to get the original string?

查看:431
本文介绍了如何反转MD5以获得原始字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
是否可以解密md5哈希?

Possible Duplicate:
Is it possible to decrypt md5 hashes?

是否可以从Java中的MD5中获取字符串?

Is it possible to get a string from MD5 in Java?

首先将字符串转换为MD5校验和,是否有可能将此MD5校验和恢复为原始文本?

Firstly a string is converted to MD5 checksum, is it possible to get this MD5 checksum back to the original text?

我假设您使用MessageDigest,即使是其他Java库,也将不胜感激任何帮助.

I'm assuming you use MessageDigest, any help is greatly appreciated, even other java libraries.

如果可能的话,还想指出一下该应用程序的功能: https://play.google.com/store/apps/details?id=com.fab.md5&hl=zh_CN

Just want to also point out on if it not possible how this app is able to it: https://play.google.com/store/apps/details?id=com.fab.md5&hl=en

我什至使用其他应用程序将一些文本转换为MD5校验和,并使用此校验和来查看应用程序是否能够将其转换回文本,并且确实如此.

I even converted some text to MD5 checksum using another application and used this checksum to see if the app was able to convert it back to text and it did.

推荐答案

不,实际上不可能,因为

No, that's not really possible, as

  • 可以有多个字符串赋予相同的 MD5
  • 它被设计为很难反转"

MD5及其哈希函数系列的目标是

The goal of the MD5 and its family of hashing functions is

  • 从长字符串中获取简短的摘录"
  • 很难猜测它们的来源
  • 很难找到冲突,也就是说,它们具有相同的哈希值(与第二个哈希值非常相似)

认为您可以获取任何字符串的MD5,甚至很长. MD5只有16个字节长(如果您用hexa编写它可以更容易地存储或分发,则为32个字节).如果可以扭转它们,那么您将拥有一个神奇的压缩方案.

Think that you can get the MD5 of any string, even very long. And the MD5 is only 16 bytes long (32 if you write it in hexa to store or distribute it more easily). If you could reverse them, you'd have a magical compacting scheme.

这就是说,由于世界上没有太多的短字符串(密码...),您可以从词典(称为蛮力攻击")中测试它们,甚至可以用Google搜索MD5.如果这个词很普通并且没有加盐,那么您就有一定的机会成功...

This being said, as there aren't so many short strings (passwords...) used in the world, you can test them from a dictionary (that's called "brute force attack") or even google for your MD5. If the word is common and wasn't salted, you have a reasonable chance to succeed...

这篇关于如何反转MD5以获得原始字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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