SHA256 is a one way function to convert a string or number into a 32 byte array which can later be used to verify the original message with a second copy of the message. Both messages, the original, and the copy, will produce the same SHA256 result, thus allowing you to verify that the message you received is the same message that was sent.

A SHA256 function cannot be reversed so it is useful for checking the integrity of your data by generating a SHA256 first, and then comparing later a new SHA256 result on the copy or backup.

Example String : satoshi nakamoto

Example Hex String : 7361746f736869206e616b616d6f746f

SHA256 Result

In Cryptocurrencies, a Brain Wallet is a concept where a private key can be created from a memorable word or phrase. That word or phrase can be passed through the SHA256 hashing function and then a new private import key with a corresponding public address can be generated. It is not recommended to use any word found in the dictionary, and your phrase should be only recognizable to you.

Wikipedia SHA-2

Bitcoin Wiki SHA-256

.NET SHA256 Class

Python Hashlib

Node.js Crypto