Cryptographic hash functions can be used for verifying file integrity. To check that the file has not been altered during transfer over the network.
Let's say we have the following file named data.txt
with the following content:
Hello world
The openssl dgst
command can be used to perform various digest operations.To generate a hash of the file data.txt
using SHA-256, run the following command: