In the old days we used the openssl tool. I have heard that after terrible security vulnerabilities with openssl, the world has moved on to alternative tools. Does macOS Sierra ship with alternatives to openssl? What is the modern approach to running a SHA-256 hash?
You can just use shasum:
shasum -a 256 FILE.txt
shasumis the name of the command.
-aoption means algorithm.
256specifies use of the 256-bit algorithm.