BC.GAME官方站点官方
前往 bc.gamebc.game

可证公平

每一局 BC 自研游戏的结果,都可以用服务端种子、客户端种子和 nonce 自行核验。选择游戏,查看它的结果是怎么算出来的。

Parity

去核验

公平性验证

import CryptoJS from "crypto-js";
  const salt = "0000000000000000000301e2801a9a9598bfb114e574a91a887f2132f33047e6";
  
  function parityValueFromHash(seed, salt) {
  let hash = String(CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(seed), salt));
  const hex = hash.slice(0, 8);
  const hexNumber = parseInt(hex, 16);
  
  return Math.floor((hexNumber*10)/0x100000000);
  }
  
  const hash = "game hash";
  console.log( "result =>", parityValueFromHash(hash, salt));