MD5 (and other one-way hash functions like CRC32) are designed
to take in a string and convert it to a shorter string, kind
of a
fingerprint of the original string. Diffrent
one-way hash functions produce
fingerprints of diffrent
lengths. But the following
criteria should hold for all good one-way hash functions:
- you can not learn anything about the input string by examining
its fingerprint except for the fact that it has that fingerprint
- a small change (even a single bit) in the input string
should cause a dramatic change in the output of the hash function
I deal with a good bit of datacomm and file transfers.
I use MD5 to identify when I have received suspect duplicate
files. I keep a DB table with the MD5 values of all
the files that have been transmitted to me. Whenever I
get a new file, I compare its MD5 valye to those stored
in the table. If the value is not in the table, I process
the file and store its MD5 value in the table. If the value
is in the table I set the file asside for special handling and
notify an operator.
If you really want to learn about exactly how the (and other hash algorighms)
work I recomend checking out Applied Cryptography by Bruce Schneier.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.