Definition
Hashing is a method of converting a key or sequence of characters into another different value. The hashing process produces a value known as a hash code, hash value, or digest.
It involves mapping keys and values into a hash table with a hash function. Hashing helps to get easier access to elements and is mostly used to implement hash tables.
Types of Hashing
- MD5: MD5 is a hashing function that encrypts data into a 128-bit hash value, usually known as a fingerprint. While you can use MD5 to verify data integrity, it is more prone to hash collision than other hashing types.
- SHA-2: The National Security Agency (NSA) developed SHA-2 to create and transmit cryptic messages. It has six hash functions: SHA-512/256, SHA-512/224, SHA-512, SHA-384, SHA-256, and SHA-224.
- CRC32: You can use cyclic redundancy check (CRC) to detect accidental or unexpected modifications in your data and to examine the integrity of your files. Currently, it is mainly used for FTP servers and zip files to verify the file’s integrity.