MCPcopy Index your code
hub / github.com/DosX-dev/scripts / XHash

Function XHash

XHash.js:7–13  ·  view source on GitHub ↗
(str, difficulty = 1, salt = "")

Source from the content-addressed store, hash-verified

5}
6
7function XHash(str, difficulty = 1, salt = "") {
8 let mathprc = str, validator = "";
9 for (var f = 0; f<((16*difficulty)+1); f++) { mathprc = md5(mathprc+salt); }
10 for (var m = 0; m<256; m++) { validator += md5(mathprc+md5(difficulty+salt)+md5(mathprc[4])+(m<10 ? validator[m] : m + salt)); }
11 mathprc = md5(validator[16] + validator[32]);
12 return mathprc+(md5(mathprc+(salt+difficulty))+validator);
13}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected