user5844: Hash functions are often called one way functions however this means that you should not be able to undo them. So why and how are SHA256 and SHA512 used in blockchains if they should be irreversible.
Also I noticed that Plutus has some unhasing functions how do these work?

user5926: The Cardano code does not use SHA256 or SHA512, but rather uses 2 different versions of the Blake2 hash functions (but Plutus may use SHA hashes).
Hash functions are used in several places. Two simple examples are block ids (ie the hash of the block) and transaction ids (the hash of the transaction). For these two examples reversing the hash is never needed.
I am almost certain that the Plutus "unhashing" function you see is just the accessor for the newtype wrapper (its a Haskell/Plutus thing).

5844: <p>Hash functions are often called one way functions however this means that you should not be able to undo them. So why and how are SHA256 and SHA512 used in blockchains if they should be irreversible.</p>
<p>Also I noticed that Plutus has some unhasing functions how do these work?</p>
 5926: <p>The Cardano code does not use SHA256 or SHA512, but rather uses 2 different versions of the Blake2 hash functions (but Plutus may use SHA hashes).</p>
<p>Hash functions are used in several places. Two simple examples are block ids (ie the hash of the block) and transaction ids (the hash of the transaction). For these two examples reversing the hash is never needed.</p>
<p>I am almost certain that the Plutus &quot;unhashing&quot; function you see is just the accessor for the <code>newtype</code> wrapper (its a Haskell/Plutus thing).</p>
