Skip to content

Instantly share code, notes, and snippets.

@RahulJyala7
Created May 21, 2020 09:37
Show Gist options
  • Select an option

  • Save RahulJyala7/29a71133e5ca0b6dc828ddace185b4b0 to your computer and use it in GitHub Desktop.

Select an option

Save RahulJyala7/29a71133e5ca0b6dc828ddace185b4b0 to your computer and use it in GitHub Desktop.
Types of Hashing
There are many different types of hash algorithms such as RipeMD, Tiger, xxhash and more, but the most common type of hashing used for file integrity checks are MD5, SHA-2 and CRC32.
MD5 - An MD5 hash function encodes a string of information and encodes it into a 128-bit fingerprint. MD5 is often used as a checksum to verify data integrity. However, due to its age, MD5 is also known to suffer from extensive hash collision vulnerabilities, but it’s still one of the most widely used algorithms in the world.
SHA-2 – SHA-2, developed by the National Security Agency (NSA), is a cryptographic hash function. SHA-2 includes significant changes from its predecessor, SHA-1. The SHA-2 family consists of six hash functions with digests (hash values) that are 224, 256, 384 or 512 bits: SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256.
CRC32 – A cyclic redundancy check (CRC) is an error-detecting code often used for detection of accidental changes to data. Encoding the same data string using CRC32 will always result in the same hash output, thus CRC32 is sometimes used as a hash algorithm for file integrity checks. These days, CRC32 is rarely used outside of Zip files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment