Message Digest- calucation using openssl


openssl command line utility is used to calculate message digest of the value.


calculate message digest writes to hexademical output to a console(stdout)
openssl dgst -sha1 file.txt

Example output:
SHA1(file.txt)= 1f8ac10f23c5b5bc1167bda84b833e5c057a77d2


calculates message digest and writes data to text file in hexademical format
openssl sha1 -out digest.txt file.txt
Example output in digest.txt file
SHA1(file.txt)= 1f8ac10f23c5b5bc1167bda84b833e5c057a77d2


   
calculate hash value using a DSA private key.
openssl dgst -dssl -sign cacert.pem -out signedoutput.txt   inputfile.txt

verification of signature of a file.
openssl dgst -dss1 -prverify cacert.pem -signature dsasign.bin file.txt

No comments:

Post a Comment