Skip to content

verifyprovablyfair/verifyprovablyfair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

sha256 & game outcome verification v0.1

sha256 verification

sha256 verification takes 2 arguments:
salt
hash (Claimed hash)

We compare Claimed hash against our function of sha256(salt). If Claimed hash is identical to our own sha(salt) function then Hash equals will be displayed.
Otherwise Hash does not equal will be displayed.

Game outcome verification

Game outcome verification takes 4 arguments:
srand (ServerRandom)
prand (PlayerRandom)
randmax (RandomNumberMax)
outcome (Claimed Outcome)

It performs the calculation of: (srand+prand)%(randmax+1) and compares it with the Claimed outcome
If it's equal then Outcome equals will be displayed.
Otherwise Outcome is NOT equal! will be displayed.

If both sha256 verification and outcome verification passed then the message Your game was provably-fair is displayed. Otherwise it displays Your game was unfair

Example usage: https://verifyprovablyfair.github.io/verifyprovablyfair/?hash=ce57ecdcf1142238d61b57d2025457b2b0469bc5a17959e0193cdd0f495fbfc7&salt=34fd51a49d84e7257c1d07e889b3cb6432b917d7e4a0d3160d905287650a6841_2&srand=2&prand=2&randmax=4&outcome=4

About

sha256 and game outcome verification

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published