Dice verify


Input


Output


Results

Final Result
Calculation Process

Using the formula `hmac_sha256(client_seed:nonce, server_seed)`,

We get the hash result:

`{{result_hash}}`.


  1. Take the first 15 characters, resulting in `{{baseHash}}`.
  2. Convert this to decimal, which gives: `{{BigInt('0x' + baseHash)}}`.
  3. Perform modulus 47(47 is fixed constant), and we get a remainder of {{index}}.
  4. Starting from the index, take 14 characters, resulting in `{{newHash}}`.
  5. Convert this to decimal, resulting in: `{{BigInt('0x' + newHash)}}`.
  6. Divide by 8(8 is a fixed constant), resulting in: `{{BigInt('0x' + newHash) / BigInt(8)}}`.
  7. Multiply by 2^-53(2^-53 is a fixed constant), resulting in: `{{Number(BigInt('0x' + newHash) / BigInt(8)) * Math.pow(2, -53)}}`.
  8. Multiply by 10000(10000 is a fixed constant), resulting in: `{{Number(BigInt('0x' + newHash) / BigInt(8)) * Math.pow(2, -53) * 10000}}`.
  9. Finally, take the integer part of the result, which gives: `{{numResult}}`.