The SHA256 algorithm represents a 256-bit cryptographic hash function. It’s the successor to SHA1, mapping an arbitrary data of any size to a hexadecimal string of 128 bits.
|Word or Phrase||SHA256 Value|
|I love Bitcoin!||d587d1a3a8f2c981a992a12face6e4074a28d2509b834fd1154f53d24579ddf4|
You can replicate the above SHA256 value using the *nix tool “sha256sum.”
echo "hello" | sha256sum
Where Is SHA256 Used?
- SHA256 hashes are used in bitcoin mining to create verifiably unique configuration strings for transactions that identify their order in the block chain and prevent double spending without relying on centralized trust
- Web, SSH, and FTP servers use them to detect accidental modifications or deletions of critical files
- Email systems use them as an anti-spam measure within emails by attaching messages from one sender into a single envelope so they can’t be presented as separate ones while passing through MTA
Hash functions have incredible utility and the above examples represent only a few of them.