Create a checksum file for all files within a directory:
checksum
$ shasum * > checksum
Check the checksum:
$ shasum -c checksum
To use sha256:
sha256
$ shasum -a 256 * > checksum