How can I get secret when I am generating a commitment?

Hello, I am reading the source code of the ENS,when I register a name,the method “function register(string name, address owner, uint duration, bytes32 secret) public payable” of contract ETHRegistrarController is called, I want to know more about the parameter “secret”, including how does it been generated and what is it used for?
Your answers will be highly appreciated!

1 Like

secret is just a random string. You call makeCommitment with the node name and secret which returns commtitment, then pass it to commit function on step 1.

These lines will probably help understanding how they all fit together.