Commit eb1012a8 authored by wang's avatar wang

nk token 测试

parent 22cc0a63
(function Sf(r, u, v, n) {
for (var t = void 0, z = r; z <= u; z++) {
for (var t = void 0, z = r; z <= u; z++) {
(t = function pf(r) {
// debugger;
var u = r.index,
v = r.puzzleHelperVars,
n = r.targetHash,
t = v.fullNibbleMask,
z = v.zeroPad,
f = v.fullNibblesMissing,
e = v.partialNibble,
w = v.leftPartOfSolution,
L = (z + (u & t).toString(16)).slice(-f),
s = w + (e + (u >> (f << 2))).toString(16) + L;
if (function (r) {
var u = "0123456789abcdef".split(""),
v = [-2147483648, 8388608, 32768, 128],
n = [24, 16, 8, 0],
t = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298],
z = [];
function f() {
z[0] = z[16] = z[1] = z[2] = z[3] = z[4] = z[5] = z[6] = z[7] = z[8] = z[9] = z[10] = z[11] = z[12] = z[13] = z[14] = z[15] = 0;
this.blocks = z;
this.h0 = 1779033703;
this.h1 = 3144134277;
this.h2 = 1013904242;
this.h3 = 2773480762;
this.h4 = 1359893119;
this.h5 = 2600822924;
this.h6 = 528734635;
this.h7 = 1541459225;
this.block = this.start = this.bytes = this.hBytes = 0;
this.finalized = this.hashed = false;
this.first = true;
}
return f.prototype.update = function (r) {
if (!this.finalized && "string" == typeof r) {
for (var u = void 0, v = 0, t = void 0, z = r.length, f = this.blocks; v < z;) {
for (this.hashed && (this.hashed = false, f[0] = this.block, f[16] = f[1] = f[2] = f[3] = f[4] = f[5] = f[6] = f[7] = f[8] = f[9] = f[10] = f[11] = f[12] = f[13] = f[14] = f[15] = 0), t = this.start; v < z && t < 64; ++v) {
(u = r.charCodeAt(v)) < 128 ? f[t >> 2] |= u << n[3 & t++] : u < 2048 ? (f[t >> 2] |= (192 | u >> 6) << n[3 & t++], f[t >> 2] |= (128 | 63 & u) << n[3 & t++]) : u < 55296 || u >= 57344 ? (f[t >> 2] |= (224 | u >> 12) << n[3 & t++], f[t >> 2] |= (128 | u >> 6 & 63) << n[3 & t++], f[t >> 2] |= (128 | 63 & u) << n[3 & t++]) : (u = 65536 + ((1023 & u) << 10 | 1023 & r.charCodeAt(++v)), f[t >> 2] |= (240 | u >> 18) << n[3 & t++], f[t >> 2] |= (128 | u >> 12 & 63) << n[3 & t++], f[t >> 2] |= (128 | u >> 6 & 63) << n[3 & t++], f[t >> 2] |= (128 | 63 & u) << n[3 & t++]);
}
this.lastByteIndex = t;
this.bytes += t - this.start;
t >= 64 ? (this.block = f[16], this.start = t - 64, this.hash(), this.hashed = true) : this.start = t;
// debugger;
var u = r.index,
v = r.puzzleHelperVars,
n = r.targetHash,
t = v.fullNibbleMask,
z = v.zeroPad,
f = v.fullNibblesMissing,
e = v.partialNibble,
w = v.leftPartOfSolution,
L = (z + (u & t).toString(16)).slice(-f),
s = w + (e + (u >> (f << 2))).toString(16) + L;
if (function (r) {
var u = "0123456789abcdef".split(""),
v = [-2147483648, 8388608, 32768, 128],
n = [24, 16, 8, 0],
t = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298],
z = [];
function f() {
z[0] = z[16] = z[1] = z[2] = z[3] = z[4] = z[5] = z[6] = z[7] = z[8] = z[9] = z[10] = z[11] = z[12] = z[13] = z[14] = z[15] = 0;
this.blocks = z;
this.h0 = 1779033703;
this.h1 = 3144134277;
this.h2 = 1013904242;
this.h3 = 2773480762;
this.h4 = 1359893119;
this.h5 = 2600822924;
this.h6 = 528734635;
this.h7 = 1541459225;
this.block = this.start = this.bytes = this.hBytes = 0;
this.finalized = this.hashed = false;
this.first = true;
}
return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this;
}
}, f.prototype.finalize = function () {
if (!this.finalized) {
this.finalized = true;
var r = this.blocks,
u = this.lastByteIndex;
r[16] = this.block;
r[u >> 2] |= v[3 & u];
this.block = r[16];
u >= 56 && (this.hashed || this.hash(), r[0] = this.block, r[16] = r[1] = r[2] = r[3] = r[4] = r[5] = r[6] = r[7] = r[8] = r[9] = r[10] = r[11] = r[12] = r[13] = r[14] = r[15] = 0);
r[14] = this.hBytes << 3 | this.bytes >>> 29;
r[15] = this.bytes << 3;
this.hash();
}
}, f.prototype.hash = function () {
var r = this.h0,
u = this.h1,
v = this.h2,
n = this.h3,
z = this.h4,
f = this.h5,
e = this.h6,
w = this.h7,
L = void 0,
s = void 0,
o = void 0,
g = void 0,
K = void 0,
D = void 0,
i = void 0,
q = void 0,
c = void 0,
y = this.blocks;
for (L = 16; L < 64; ++L) {
s = ((K = y[L - 15]) >>> 7 | K << 25) ^ (K >>> 18 | K << 14) ^ K >>> 3;
o = ((K = y[L - 2]) >>> 17 | K << 15) ^ (K >>> 19 | K << 13) ^ K >>> 10;
y[L] = y[L - 16] + s + y[L - 7] + o << 0;
}
for (c = u & v, L = 0; L < 64; L += 4) {
this.first ? (D = 704751109, w = (K = y[0] - 210244248) - 1521486534 << 0, n = K + 143694565 << 0, this.first = false) : (s = (r >>> 2 | r << 30) ^ (r >>> 13 | r << 19) ^ (r >>> 22 | r << 10), g = (D = r & u) ^ r & v ^ c, w = n + (K = w + (o = (z >>> 6 | z << 26) ^ (z >>> 11 | z << 21) ^ (z >>> 25 | z << 7)) + (z & f ^ ~z & e) + t[L] + y[L]) << 0, n = K + (s + g) << 0);
s = (n >>> 2 | n << 30) ^ (n >>> 13 | n << 19) ^ (n >>> 22 | n << 10);
g = (i = n & r) ^ n & u ^ D;
e = v + (K = e + (o = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7)) + (w & z ^ ~w & f) + t[L + 1] + y[L + 1]) << 0;
s = ((v = K + (s + g) << 0) >>> 2 | v << 30) ^ (v >>> 13 | v << 19) ^ (v >>> 22 | v << 10);
g = (q = v & n) ^ v & r ^ i;
f = u + (K = f + (o = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7)) + (e & w ^ ~e & z) + t[L + 2] + y[L + 2]) << 0;
s = ((u = K + (s + g) << 0) >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10);
g = (c = u & v) ^ u & n ^ q;
z = r + (K = z + (o = (f >>> 6 | f << 26) ^ (f >>> 11 | f << 21) ^ (f >>> 25 | f << 7)) + (f & e ^ ~f & w) + t[L + 3] + y[L + 3]) << 0;
r = K + (s + g) << 0;
}
this.h0 = this.h0 + r << 0;
this.h1 = this.h1 + u << 0;
this.h2 = this.h2 + v << 0;
this.h3 = this.h3 + n << 0;
this.h4 = this.h4 + z << 0;
this.h5 = this.h5 + f << 0;
this.h6 = this.h6 + e << 0;
this.h7 = this.h7 + w << 0;
}, f.prototype.hex = function () {
this.finalize();
var r = this.h0,
v = this.h1,
n = this.h2,
t = this.h3,
z = this.h4,
f = this.h5,
e = this.h6,
w = this.h7;
return u[r >> 28 & 15] + u[r >> 24 & 15] + u[r >> 20 & 15] + u[r >> 16 & 15] + u[r >> 12 & 15] + u[r >> 8 & 15] + u[r >> 4 & 15] + u[15 & r] + u[v >> 28 & 15] + u[v >> 24 & 15] + u[v >> 20 & 15] + u[v >> 16 & 15] + u[v >> 12 & 15] + u[v >> 8 & 15] + u[v >> 4 & 15] + u[15 & v] + u[n >> 28 & 15] + u[n >> 24 & 15] + u[n >> 20 & 15] + u[n >> 16 & 15] + u[n >> 12 & 15] + u[n >> 8 & 15] + u[n >> 4 & 15] + u[15 & n] + u[t >> 28 & 15] + u[t >> 24 & 15] + u[t >> 20 & 15] + u[t >> 16 & 15] + u[t >> 12 & 15] + u[t >> 8 & 15] + u[t >> 4 & 15] + u[15 & t] + u[z >> 28 & 15] + u[z >> 24 & 15] + u[z >> 20 & 15] + u[z >> 16 & 15] + u[z >> 12 & 15] + u[z >> 8 & 15] + u[z >> 4 & 15] + u[15 & z] + u[f >> 28 & 15] + u[f >> 24 & 15] + u[f >> 20 & 15] + u[f >> 16 & 15] + u[f >> 12 & 15] + u[f >> 8 & 15] + u[f >> 4 & 15] + u[15 & f] + u[e >> 28 & 15] + u[e >> 24 & 15] + u[e >> 20 & 15] + u[e >> 16 & 15] + u[e >> 12 & 15] + u[e >> 8 & 15] + u[e >> 4 & 15] + u[15 & e] + (u[w >> 28 & 15] + u[w >> 24 & 15] + u[w >> 20 & 15] + u[w >> 16 & 15] + u[w >> 12 & 15] + u[w >> 8 & 15] + u[w >> 4 & 15] + u[15 & w]);
}, f.prototype.toString = f.prototype.hex, new f().update(r).hex();
}(s) === n) {
return s;
}
}({
index: z,
puzzleHelperVars: v,
targetHash: n
return f.prototype.update = function (r) {
if (!this.finalized && "string" == typeof r) {
for (var u = void 0, v = 0, t = void 0, z = r.length, f = this.blocks; v < z;) {
for (this.hashed && (this.hashed = false, f[0] = this.block, f[16] = f[1] = f[2] = f[3] = f[4] = f[5] = f[6] = f[7] = f[8] = f[9] = f[10] = f[11] = f[12] = f[13] = f[14] = f[15] = 0), t = this.start; v < z && t < 64; ++v) {
(u = r.charCodeAt(v)) < 128 ? f[t >> 2] |= u << n[3 & t++] : u < 2048 ? (f[t >> 2] |= (192 | u >> 6) << n[3 & t++], f[t >> 2] |= (128 | 63 & u) << n[3 & t++]) : u < 55296 || u >= 57344 ? (f[t >> 2] |= (224 | u >> 12) << n[3 & t++], f[t >> 2] |= (128 | u >> 6 & 63) << n[3 & t++], f[t >> 2] |= (128 | 63 & u) << n[3 & t++]) : (u = 65536 + ((1023 & u) << 10 | 1023 & r.charCodeAt(++v)), f[t >> 2] |= (240 | u >> 18) << n[3 & t++], f[t >> 2] |= (128 | u >> 12 & 63) << n[3 & t++], f[t >> 2] |= (128 | u >> 6 & 63) << n[3 & t++], f[t >> 2] |= (128 | 63 & u) << n[3 & t++]);
}
this.lastByteIndex = t;
this.bytes += t - this.start;
t >= 64 ? (this.block = f[16], this.start = t - 64, this.hash(), this.hashed = true) : this.start = t;
}
return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this;
}
}, f.prototype.finalize = function () {
if (!this.finalized) {
this.finalized = true;
var r = this.blocks,
u = this.lastByteIndex;
r[16] = this.block;
r[u >> 2] |= v[3 & u];
this.block = r[16];
u >= 56 && (this.hashed || this.hash(), r[0] = this.block, r[16] = r[1] = r[2] = r[3] = r[4] = r[5] = r[6] = r[7] = r[8] = r[9] = r[10] = r[11] = r[12] = r[13] = r[14] = r[15] = 0);
r[14] = this.hBytes << 3 | this.bytes >>> 29;
r[15] = this.bytes << 3;
this.hash();
}
}, f.prototype.hash = function () {
var r = this.h0,
u = this.h1,
v = this.h2,
n = this.h3,
z = this.h4,
f = this.h5,
e = this.h6,
w = this.h7,
L = void 0,
s = void 0,
o = void 0,
g = void 0,
K = void 0,
D = void 0,
i = void 0,
q = void 0,
c = void 0,
y = this.blocks;
for (L = 16; L < 64; ++L) {
s = ((K = y[L - 15]) >>> 7 | K << 25) ^ (K >>> 18 | K << 14) ^ K >>> 3;
o = ((K = y[L - 2]) >>> 17 | K << 15) ^ (K >>> 19 | K << 13) ^ K >>> 10;
y[L] = y[L - 16] + s + y[L - 7] + o << 0;
}
for (c = u & v, L = 0; L < 64; L += 4) {
this.first ? (D = 704751109, w = (K = y[0] - 210244248) - 1521486534 << 0, n = K + 143694565 << 0, this.first = false) : (s = (r >>> 2 | r << 30) ^ (r >>> 13 | r << 19) ^ (r >>> 22 | r << 10), g = (D = r & u) ^ r & v ^ c, w = n + (K = w + (o = (z >>> 6 | z << 26) ^ (z >>> 11 | z << 21) ^ (z >>> 25 | z << 7)) + (z & f ^ ~z & e) + t[L] + y[L]) << 0, n = K + (s + g) << 0);
s = (n >>> 2 | n << 30) ^ (n >>> 13 | n << 19) ^ (n >>> 22 | n << 10);
g = (i = n & r) ^ n & u ^ D;
e = v + (K = e + (o = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7)) + (w & z ^ ~w & f) + t[L + 1] + y[L + 1]) << 0;
s = ((v = K + (s + g) << 0) >>> 2 | v << 30) ^ (v >>> 13 | v << 19) ^ (v >>> 22 | v << 10);
g = (q = v & n) ^ v & r ^ i;
f = u + (K = f + (o = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7)) + (e & w ^ ~e & z) + t[L + 2] + y[L + 2]) << 0;
s = ((u = K + (s + g) << 0) >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10);
g = (c = u & v) ^ u & n ^ q;
z = r + (K = z + (o = (f >>> 6 | f << 26) ^ (f >>> 11 | f << 21) ^ (f >>> 25 | f << 7)) + (f & e ^ ~f & w) + t[L + 3] + y[L + 3]) << 0;
r = K + (s + g) << 0;
}
this.h0 = this.h0 + r << 0;
this.h1 = this.h1 + u << 0;
this.h2 = this.h2 + v << 0;
this.h3 = this.h3 + n << 0;
this.h4 = this.h4 + z << 0;
this.h5 = this.h5 + f << 0;
this.h6 = this.h6 + e << 0;
this.h7 = this.h7 + w << 0;
}, f.prototype.hex = function () {
this.finalize();
var r = this.h0,
v = this.h1,
n = this.h2,
t = this.h3,
z = this.h4,
f = this.h5,
e = this.h6,
w = this.h7;
return u[r >> 28 & 15] + u[r >> 24 & 15] + u[r >> 20 & 15] + u[r >> 16 & 15] + u[r >> 12 & 15] + u[r >> 8 & 15] + u[r >> 4 & 15] + u[15 & r] + u[v >> 28 & 15] + u[v >> 24 & 15] + u[v >> 20 & 15] + u[v >> 16 & 15] + u[v >> 12 & 15] + u[v >> 8 & 15] + u[v >> 4 & 15] + u[15 & v] + u[n >> 28 & 15] + u[n >> 24 & 15] + u[n >> 20 & 15] + u[n >> 16 & 15] + u[n >> 12 & 15] + u[n >> 8 & 15] + u[n >> 4 & 15] + u[15 & n] + u[t >> 28 & 15] + u[t >> 24 & 15] + u[t >> 20 & 15] + u[t >> 16 & 15] + u[t >> 12 & 15] + u[t >> 8 & 15] + u[t >> 4 & 15] + u[15 & t] + u[z >> 28 & 15] + u[z >> 24 & 15] + u[z >> 20 & 15] + u[z >> 16 & 15] + u[z >> 12 & 15] + u[z >> 8 & 15] + u[z >> 4 & 15] + u[15 & z] + u[f >> 28 & 15] + u[f >> 24 & 15] + u[f >> 20 & 15] + u[f >> 16 & 15] + u[f >> 12 & 15] + u[f >> 8 & 15] + u[f >> 4 & 15] + u[15 & f] + u[e >> 28 & 15] + u[e >> 24 & 15] + u[e >> 20 & 15] + u[e >> 16 & 15] + u[e >> 12 & 15] + u[e >> 8 & 15] + u[e >> 4 & 15] + u[15 & e] + (u[w >> 28 & 15] + u[w >> 24 & 15] + u[w >> 20 & 15] + u[w >> 16 & 15] + u[w >> 12 & 15] + u[w >> 8 & 15] + u[w >> 4 & 15] + u[15 & w]);
}, f.prototype.toString = f.prototype.hex, new f().update(r).hex();
}(s) === n) {
return s;
}
}({
index: z,
puzzleHelperVars: v,
targetHash: n
})) && (console.log(JSON.stringify({
index: z,
puzzleHelperVars: v,
targetHash: n
index: z,
puzzleHelperVars: v,
targetHash: n
}), t), postMessage(t));
}
postMessage(false);
}).apply(null, [209716,419431,{"fullNibbleMask":1048575,"zeroPad":"00000","fullNibblesMissing":5,"partialNibble":6,"leftPartOfSolution":"b51b821e337645dcdb6ce3ce2302aa3f8bcdfafac4698aa7c2f64968d9","startTime":3103.2000000476837},"37e24d5d1ec249d273d4a208ff99e1ffa86030e433f9e35d5caadd04e59428ef"])
\ No newline at end of file
}
postMessage(false);
}).apply(null, [0, 255804, {"fullNibbleMask":65535,"zeroPad":"0000","fullNibblesMissing":4,"partialNibble":0,"leftPartOfSolution":"ac9e3049cb2f7f391f38d2426d3e07be19cd069a490b05aea023f2cc568","startTime":3026.5}, "2ae40e50f07a63eac255fcb3537cde202bd49eaede6c6795060e43bbdd343dec"])
\ No newline at end of file
......@@ -97,16 +97,19 @@ function createPX1132(hash, hash2, hashv) {
puzzleHelperVars: u,
targetHash: v
})
console.log({
if (t){
console.log({
index: e,
puzzleHelperVars: u,
targetHash: v
})
}
if (t) return t;
}
}).apply(null, [0, 155804, {
}).apply(null, [0, 156804, {
"fullNibbleMask": w,
"zeroPad": "0000",
"fullNibblesMissing": q,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment