Using a hash function to determine the winner of a rock-paper-scissors game can prevent malicious guessing by making it difficult for an attacker to predict the outcome. The choices made by the players are input into the hash function, which generates a unique hash value. This value is then used to determine the winner. Since the hash function is one-way, it is infeasible to recreate the original choices from the hash value. An attacker would need to try all combinations of choices and generate the corresponding hash values, which would take a significant amount of time and resources. This helps ensure that the game is played fairly and the results are determined by chance.
younesbram/sha-gamble
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A rock paper scissors betting game in ruby, using SHA-256 to prevent malicious guessing attacks.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published