Log in
Register
ENG
RUS
BEL
UKR
TUR
Log in
Register
Fair play
Explanation
// Add CryptoJS library for making hashes in web page
const script = document.createElement("script");
script.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js";
document.head.appendChild(script);
// Create the check hash function
function checkHash(coefficient, salt1, salt2, hashValue) {
// Transform coefficient to necessary fromat
coefficient = "|" + coefficient + "|";
// Concatenate the coefficient, salts
const input = coefficient + salt1 + salt2;
// Create the hash value using the specified algorithm
const calculatedHashValue = CryptoJS.SHA256(input).toString(CryptoJS.enc.Hex);
// Compare the calculated hash value to the given hash value
return calculatedHashValue === hashValue;
}
// Example
const coefficient = '1';
const hashValue = '3bb1c4ab0fe1248c38aabe49adce0475527547ca470cb474f05f48805a3830d7';
const salt1 = `8r"D%Z8$U],gyI&B`;
const salt2 = `u[X/zp0?=*U]!1/iFo;<W]xi`;
const isValid = checkHash(coefficient, salt1, salt2, hashValue);
if (isValid) {
console.log('Hash value is valid for the given input coefficient and hash function');
} else {
console.log('Hash value is not valid for the given input coefficient and hash function');
}
How to check:
- Paste the Coefficient provided in the game.
- Paste the Hash.
- Paste the values of Salt 1, Salt 2.
- Click "Check".
How to check using a script:
- Copy the script from the first block, paste and send it to the developer console in your browser. This will add the encryption library to the page.
- Copy the script from the second block, paste it into the console, and fill in your parameters in the necessary variables.
- Run the script in the developer console and obtain the game result.