开发者

Need MD5 guideline

开发者 https://www.devze.com 2022-12-27 08:54 出处:网络
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

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.


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, 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]).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号