|
@@ -89,14 +89,14 @@ class randomFree {
|
|
let saltArray = [];
|
|
let saltArray = [];
|
|
let hashedCardsArray= [];
|
|
let hashedCardsArray= [];
|
|
for (let i =0; i<5; i++){
|
|
for (let i =0; i<5; i++){
|
|
- let playerCard = Math.floor((Math.random()*100 )% 100 );
|
|
|
|
|
|
+ let playerCard = Math.floor((Math.random()*100 ) % 100 );
|
|
let salt = crypto.lib.WordArray.random(128 / 8).toString();
|
|
let salt = crypto.lib.WordArray.random(128 / 8).toString();
|
|
let hashedCard = cryptoSHA256(playerCard.toString + salt);
|
|
let hashedCard = cryptoSHA256(playerCard.toString + salt);
|
|
playerCardsArray.push(playerCard);
|
|
playerCardsArray.push(playerCard);
|
|
saltArray.push(salt);
|
|
saltArray.push(salt);
|
|
hashedCardsArray.push(hashedCard.toString());
|
|
hashedCardsArray.push(hashedCard.toString());
|
|
}
|
|
}
|
|
- return {playerCardsArray, saltArray, hashedCardsArray};
|
|
|
|
|
|
+ return {playerCardsArray, saltArray, hashedCardsArray};
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|