Using Hash Codes
If you are going to be dealing with cryptography applications, you're going to have to know how to generate hash algorithms and hash codes at some point. (In fact, as you saw in the previous section hash codes are useful in many noncryptographic scenarios.) Hash codes are generated using hash algorithms, which may be written using any of several algorithms such as MD5, SHA1, and SHA256, to name a few. Each hashing algorithm has its benefits and drawbacks, but they all essentially operate in the same way—the key difference is that differing hashing algorithms produce hash values of different length. In some cases, you may need a very short hash value, so using SHA256 (which produces a hash value that's 256 bytes long) may not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access