ubuntu:openssl:compute_a_checksum_of_a_file
This is an old revision of the document!
Table of Contents
Ubuntu - OpenSSL - Compute a checksum of a file
OpenSSL can compute a checksum (digest) against a file.
To ensure that the contents of a file has not been tampered with, OpenSSL can compute a unique checksum for the file.
Once this checksum is computed, it can be shared and, for example, anyone downloading the file can run the same checksum process to ensure that they get the same checksum - which ensures that the contents of a file have not changed.
Get a list of checksum methods that OpenSSL supports
openssl dgst -list
returns:
Supported digests: -blake2b512 -blake2s256 -md4 -md5 -md5-sha1 -ripemd -ripemd160 -rmd160 -sha1 -sha224 -sha256 -sha3-224 -sha3-256 -sha3-384 -sha3-512 -sha384 -sha512 -sha512-224 -sha512-256 -shake128 -shake256 -sm3 -ssl3-md5 -ssl3-sha1 -whirlpool
Compute an MD5 Checksum for a file
openssl dgst -md5 test.sh
returns:
MD5(test.sh)= 68e2009b8a69745f4371011194a16116
NOTE: This can also be run as:
openssl md5 test.sh
ubuntu/openssl/compute_a_checksum_of_a_file.1611931419.txt.gz · Last modified: 2021/01/29 14:43 by peter