How to Check SHA1 Hash of a String
If you use LinkedIn you’ve probably heard by now that a major security breach occurred with over 6.5 million user passwords stolen and leaked to the web. The first thing you should do is change your password on that site, but if you want to see if your password was among those leaked you’d need the SHA1 hash of the password itself.
Here is how to check the SHA1 digest of any text string, in this example we’ll use a password. Launch Terminal and enter the following command:
echo -n "yourpassword" | openssl sha1
The output will look something like this:
That is the sha1 checksum of “yourpassword”, obviously change “yourpassword” to your actual password to see its hash.
You could use that output to compare it against a list of leaked passwords in the recent LinkedIn example, but ultimately this can be used to verify any sha1 checksum.