A cryptographic hash function converts arbitrarily long input data into a predetermined fixed-length output value. Hash functions generally include padding as well as termination schemes that work in union with the function itself to provide greater security to the output value. The most commonly used cryptographic hash functions include MD5, SHA-1, and SHA-2.
Cryptographic hash functions are widely used in security protocols like SSL/TLS and SSH, and in other applications that rely on data integrity. Cryptocurrencies use hashing algorithms to update a blockchain with new blocks of secure and verifiable transaction data. (BitCoin, for example, uses SHA-2 for transaction verification.)
SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function that can convert an arbitrarily long string of data into a digest with a fixed size of 160 bits. This digest is commonly displayed as a 40 character hexadecimal number.
The SHA-1 algorithm is now considered insecure. SHA-1 certificates are no longer in compliance with the CA/B Forum Baseline Requirements, or supported by the current versions of major web browsers.
The Secure Hash Algorithm (SHA) series of hash functions is comprised of different sets (SHA-0, SHA-1, SHA-2, SHA-3).
SHA-2 (Secure Hash Algorithm 2) refers to a family of cryptographic hash functions that can convert arbitrarily long strings of data into digests of a fixed size (224, 256, 384, or 512 bits). 256-bit SHA-2, also known as SHA-256, is the most often-used version. The digest is commonly displayed as a fixed value hexadecimal number. (SHA-256, for instance, returns a 64 character code.)
SHA-2 has supplanted SHA-1 in security protocols like SSL/TLS.