Tuesday, April 8, 2014

Compute SHA checksum for a string on MAC terminal

$echo -n <the_string> | shasum -a 256

Explanation:
The option -n tells echo not to output the trailing newline.
The option -a 256 of shasum specifies to use 256 algorithm.

No comments:

Post a Comment