jayphbee
jayphbee

Reputation: 41

How does EVM memory data location of the first two 32-bytes slot be used?

solidity doc says:

0x00 - 0x3f (64 bytes): scratch space for hashing methods

how can i understand "scratch space for hashing methods" ?

Upvotes: 4

Views: 434

Answers (1)

Hasan Raza
Hasan Raza

Reputation: 81

Simply put, these 64 bytes of space will be used by hashing methods (e.g., keccak256) which need a temporary space to store intermediate outputs before ultimately returning a final output.

In hash functions, there are a lot of steps involved and the output of one step is the input for the next. This makes it necessary to have a reserve space available to perform these workings and store the intermediate outputs.

Upvotes: 2

Related Questions