concept hash in category cryptography

This is an excerpt from Manning's book Real-World Cryptography.
Figure 2.1. A webpage linking to an external website containing a file. The external website cannot modify the content of the file, because the first page provides a hash or digest of the file, which ensures the integrity over the downloaded file.
![]()
Alice, for example, can send transactions to the network, but to have them accepted she needs to include a proof that the transaction came from her. For this, she can hash the transaction, and sign it (I gave a very similar example in the previous chapter). Anyone can hash the transaction and verify the signature on the hash to see that this is the transaction Alice meant to send. Figure 2.18 illustrates that a man-in-the-middle-attacker who would intercept the transaction before it reached the network would not be able to tamper with the transaction. This is because the hash would change, and the signature would then not verify the new transaction digest.
Figure 2.18. Alice sends a transaction, as well as a signature over the hash of the transaction. If a man-in-the-middle attacker attempts to tamper with the transaction, the hash will be different and thus the attached signature will be incorrect.
![]()
Figure 12.5. To mine, a miner can fix every field of a block (like the block number, the hash of the previous block, transactions to include) and randomly generate a nonce until the hash of the block is a value smaller than the current difficulty target.