One-way hashing
Hashing takes an input of arbitrary length and produces a fixed length digest of that input. We can think of the hash of a document like the document's fingerprints. It is extremely unlikely two different documents will produce the same hash (this is called collision resistance) in a well designed hash function. Today we focus on the popular SHA-256 hash function.
Code files for today:
Note: all code examples are based heavily on (or copied exactly from) code originally developed by SEED Labs.