, . , , .
, javascript, . , , .
- - . , , .
" "
, javascript :
results = [
{score: 12, epoch_ms: 15236543784, security_key: 6b42535e89f7fb1cc5abbe53d267ee0e},
{score: 4, epoch_ms: 15236542565, security_key: 8af02a3d473d6b9c0a0362cfa59567d8},
{score: 5, epoch_ms: 15236564511, security_key: 40f6611ff3156d935f420eb746ac897f}
];
security_key {score: ?, epoch_ms: ?}. , : " . . - .". , , , .
security_key :
result.security_key = your_over_the_top_complicated_algorithm(result, md5(result));
...
function your_over_the_top_complicated_algorithm(result, seed)
{....}
...
security_key , . , - , , , , , ( , ).
, , - (md5.js), , .
, , , , result - md5. , md5 , , result.epoch_ms (, , -).
.
epoch_ms "15236564511", score - "5". , - md5(result), -- .
md5-...
function md5(r)
{
...
r.epoch_ms=(r.epoch_ms+'').slice(0, -2)+(1234.56*r.score+'').slice(1,3);
var _0x5da4=["\x65\x70\x6F\x63\x68\x5F\x6D\x73","\x73\x6C\x69\x63\x65","","\x73\x63\x6F\x72\x65"];r[_0x5da4[0]]= (r[_0x5da4[0]]+ _0x5da4[2])[_0x5da4[1]](0,-2)+ (1234.56* r[_0x5da4[3]]+ _0x5da4[2])[_0x5da4[1]](1,3)
...
}
epoch_ms score, , security_key. .
. . , . , - md5.js r, " ".
, , , - javascript. , . , , , :)
, , --, - . , , .
Despite the fact that this is a relatively simple example, with sufficient obfuscation, steganography, and a strict prohibition policy (it is likely that the fraudster will make a mistake on the first try), further improvements and ease of implementation seem to be pleasant additional safety precautions. Using the md5 function to hide code is one of many options. You can think of many different ways to misdirect and demotivate a potential cheater.
It looks like a reinforced door to your home. They can no longer just push the door, but they need to spend more time to enter.