SUITED FOURS

Check a hand

Your browser hashes the key, compares it with the fingerprint written down before the deal, and rebuilds the deck from it with its own code. Nothing you put here is sent anywhere.

What this does

SHA-256 of the key's 32 bytes has to equal the fingerprint. Then each block of numbers is HMAC-SHA256 of suitedfours deck v1|seed|hand number|block under the key, read as eight 32-bit numbers. The fresh deck (spades 2 to ace, then hearts, diamonds, clubs) is shuffled from the last card down: for each place, a number below the largest multiple of the places left picks the card to swap in, and anything above it is thrown away so no card is favoured. The engine deals from the end of that deck, so the order dealt is that deck backwards.

This page uses your browser's Web Crypto for SHA-256 and HMAC, separate from the code the app deals with. How dealing works, and every test.