需要MD5指导
MD5的编解码有没有具体的算法。请给我正确的方向或指南,以便我可以继续前进。我在谷歌上搜索了很多,但没有找到,请提供文章或教程链接。
Is there any specific algorithm for the encoding and decoding MD5. Kindly give me the proper direction or guideline, so that I can move on.. I have search a lot on Google but I haven't find, kindly give the articles or tutorial link.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
MD5 是一种散列算法,根据定义,它是(应该是)不可解码的。有关算法的说明,请阅读维基百科。
但是,您很少需要自己实现该算法,因为大多数平台都带有实现。
第一次谷歌点击:http://sourceforge.net/projects/libmd5-rfc/
MD5 is a hashing algorithm, which by definition is (supposed to be) un-decodable. For a description of the algorithm, read Wikipedia.
However, you rarely need to implement the algorithm yourself because most platforms come with an implementation.
First google hit: http://sourceforge.net/projects/libmd5-rfc/
MD5,不“编码”或“解码”。 MD5 将可变大小的输入(高达许多 TB)转换为固定大小的输出(128 位,也称为 16 字节)。 MD5 的要点是不允许计算逆变换。
MD5 规范简短易读,包含测试向量和 C 实现。许多编程语言/环境已经包含 MD5 实现。还有许多独立的密码库提供各种语言的 MD5 实现;你可能想看看 sphlib< /a> 其中包含 C 和 Java 中 MD5 的优化代码。
但请注意,MD5 现在被认为是密码学上的弱项。特别是,已经找到了有效计算冲突的方法(两个不同的输入具有相同的输出),这是一个好的哈希函数不应允许的事情(任何哈希函数都必然存在冲突,但实际计算此类冲突应该是不可行的) ;对于 MD5 来说非常简单 [在基本 PC 上大约需要 14 秒的 CPU 时间])。
MD5, does not "encode" or "decode". MD5 transforms a variable-size input (up to many many terabytes) into a fixed-size output (128 bits, aka 16 bytes). The point of MD5 is to not allow the inverse transformation to be computed.
The MD5 specification is short, easy to read, and includes test vectors and a C implementation. Many programming languages/environments already include MD5 implementations. There are also many independent cryptographic libraries which offer MD5 implementations in various languages; you may want to have a look at sphlib which includes optimized code for MD5 in both C and Java.
Note, though, that MD5 is now considered to be cryptographically weak. In particular, ways have been found to efficiently compute collisions (two distinct inputs with the same output), something which a good hash function should not allow (collision necessarily exist for any hash function, but it should not be feasible to actually compute such collisions; for MD5 it is quite easy [about 14 seconds worth of CPU on a basic PC]).