Tobet BlackJack Verify

玩家种子(Player Seed):

GameId+BetUserNum+BetPlayersAccount+BetAmount+LastBetTime

玩家签名种子(Player Signature):

Sign(GameId+BetUserNum+BetPlayersAccount+BetAmount+LastBetTime)

签名公钥(Public Key):

结果(Result) 玩家名称(PlayerAccount)

公式(Formula):

hash = SHA256(Player Signature);

for(var i=0;i<49;i++){

//Each time take 6 digits and convert it to hexadecimal number, the rule is (1-6digits,2-7digits... 49-54digits)

var signHash = parseInt(hash.substr(i,6),16);

//The index of the drawn card is obtained by using signHash to mod the remaining number of CARDS

var index = Math.abs(signHash % (208-i));

if(i<14){

ACards.push(poker[index]);

}else if(i >= 14 && i < 28){

BCards.push(poker[index]);

}else if(i >= 28 && i < 42){

CCards.push(poker[index]);

}else {

BankerCards.push(poker[index]);

}

}