There are plenty of examples of "Provably Fair" blackjack...
crypto-games.net has BJ on their site... the basic process works like this:
The "Rules" they implement are:
Rules:
- 4 decks
- Shuffle after each hand
- Dealer hits on Soft 17
- Double on any two cards
- Hit split aces
- Surrender
- Blackjack pays 6:5
- Blackjack is paid on split hands
To "create" four decks of cards... they simply assign a "value" to each card from the numbers 0-207 (Four decks = 4*52 card = 208 cards)...
As they explain in their "Provably Fair" section for BlackJack:
Last server seed SHA256: Last seed generated on our side (encrypted SHA256)
Last server seed: Last server seed generated by our side
Last client seed:Last client seed generated on your side
Next server seed SHA256: Next server seed (encrypted SHA256)
Next client seed: Your next client seed
SHA512 hash: Server seed and client seed combined and encrypted in SHA512
To check if your last bet was truly fair, go to an online SHA512 generator, copy Server and Client seed and for a result you'll receive SHA512 hash.
Then, convert characters from Hexadecimal to Decimal in sets by two. If decimal result finish with digit between 0-207, then this digit represents one card. Each card has its own number. List of cards and their assigned numbers can be found
here. If the number is picked twice, or if it's higher than 207, then the step is skipped.
Basically, they generate a SHA512 from the Server and Client seeds (The "encrypted" SHA256 hash of the server seed and your client seed can be viewed PRIOR to the hand being dealt) and start converting the bytes from that SHA512 to numbers between 0-255... these are matched to the 0-207 values assigned to the cards and as stated, if the number is picked twice (ie. card already used) or higher than 207 (card doesn't exist), it is ignored and next number from 0-255 is used...
Each card is then displayed in turn as you play the hand... AFTER the hand, you will be shown the unencrypted server seed... which you can then SHA256 and prove that it matches the SHA256 hash that you were shown BEFORE the hand to prove that the site hasn't changed anything... = Provably Fair = they cannot change the results.
A lot of people fail to grasp how all this works and regularly accuse the various betting sites of "cheating" when they hit a bad losing streak
Worked Example:The "secret" server seed for the next hand is: ServerSeed1 (you CANNOT see this prior to the hand starting)
The SHA256 code they would display would be: b41c9d6dc789242d3a4515c150b3141aaae41547f61ca2767881cb79fc46e981 (you CAN see this prior to the hand starting)
You client seed is set to be: ClientSeed1
As per CG.net's process, the server takes "server seed + client seed" = "ServerSeed1ClientSeed1" giving
a SHA512 of:
3205644f639e62da116a6fbb2a93ea0c689e546b4217fc6ef90423ba2af7c30b4b23ec544b53166
ac11618621780b1bdc0de8dbe1caf9a806d4184a33293eff2
You split it up into hex groups of 2 chars so that you end up with "card values" of: 32, 05, 64, 4f, 63, 9e, 62, da, 11, 6a etc etc...
Which
converted from hex to decimal = 50, 5, 100, 79, 99, 158, 98, 218...
Converting from
the published list of cards = QC, 6S, 10C, 2D, 9C, 3S, 8C, "Out of Range ignored"... etc
Which would most likely result in the following BJ result:
Player: QC
Dealer: 6S
Player: QC+10C (stands on 20)
Dealer: 6S+2D+9C (stands on 17)
Player wins!
After the round is finished, the server will publish the previous rounds "server seed"... which was ServerSeed1... you can then do all the checking... first check that the SHA256 of ServerSeed1 = b41c9d6dc789242d3a4515c150b3141aaae41547f61ca2767881cb79fc46e981 -CHECK OK!
Then check that ServerSeed1ClientSeed1 = SHA512 used... 3205644f639e62da116a6fbb2a93ea0c689e546b4217fc6ef90423ba2af7c30b4b23ec544b53166
ac11618621780b1bdc0de8dbe1caf9a806d4184a33293eff2 - CHECK OK!
Then you check that all the cards generated match as per their published algorithm... - CHECK OK! Everything checks out