function takes in input x,
it checks wheter output H(x) already exists,
If it exists, it returns that output,
If not it creates new output, associates it to this input and returns that out.
What is it used for?¶
How does it work?¶
Let’s start from explaining a graphic below:
Notice that instead of keeping n hashes, you could just keep one root hash created from all previous ones. This is very efficient and saves some space - that’s why we can compare it to a compression.