Hashing with OpenSSL
20 Feb 2017
Today’s post will be a quick tip on generating a hash using OpenSSL.
Setup your makefile
We need to reference libssl
and libcrypto
in our Makefile:
The code
A simple main
function that will hash a simple message:
Testing
Running this application just generates a hash of the word “hello”:
We can verify our result using sha256sum
: