python - python中有md5解密函数吗?

标签 python md5

<分区>

Possible Duplicate:
Is it possible to decrypt md5 hashes?

我使用了md5.new()md5.update("aaa")md5.digest()

形成数据 "aaa" 的 md5 散列。如何使用python取回数据?

最佳答案

您无法解码 md5 散列,因为散列是一个最好被认为是 one-way encoding 的过程(也就是说,不能对散列的内容进行去散列处理;只能通过检查已知散列列表或对一组输入进行散列并将生成的散列与您尝试的散列进行匹配来确定散列的内容“解码”)。

引用维基百科,这种哈希算法的主要特点是:

it is infeasible to find a message that has a given hash,

it is infeasible to modify a message without changing its hash,

it is infeasible to find two different messages with the same hash.

当今此类算法最常见的用途是:

  • 存储密码
  • 验证文件的内容。

如果你想对数据进行双向加密,你需要查看 Python 的其他加密库(通常,Stackoverflow 有一个 recommendation)。

关于python - python中有md5解密函数吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2760911/

相关文章:

php - 缺少密码检查

security - CRC和散列方法(MD5,SHA1)之间的区别

php - md5 与 Android 和 PHP

python - df [‘’ ] 和 df[ [‘’ ]] 有什么区别

python - 根据列对某些行赋予权重

c++ - C++中python dict和tr1::unordered_map的区别

node.js - Skrill Quick Checkout 中的 MSID 生成

postgresql - md5() 适用于文字,但不适用于列数据

用于连接到 FTP 和下载文件的 Python 2.5 脚本

python - 将长条件表达式拆分为行