-
Notifications
You must be signed in to change notification settings - Fork 29
/
worker.js
16 lines (14 loc) · 4.55 KB
/
worker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2011 T9 Productions
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K=[1V,24,2b,1E,2c,29,2A,2p,2n,2J,2o,2q,2s,2r,2m,2l,2g,2f,2h,2i,2k,2j,2t,2u,2E,2D,2F,2G,2I,2H,2C,2B,2w,2x,2y,2z,2e,2d,1O,1N,1P,1Q,1S,1R,1M,1L,1G,1F,1H,1I,1K,1J,1T,1U,28,27,2a,23,1W,1X,1Y,20,1Z,2v];q 2Q=0;q 2X=0;q 2W;q M="2V";q 2K="2Z";r 1x(1h,1i,1j,1g,1f,1c,1d,1e,1k,1l,1r,1s,1t,1q,P,T,Z,Y,X,Q,W,S){M=1h+"*"+1i+"*"+1j+"*"+1g+"*"+1f+"*"+1c+"*"+1d+"*"+1e+"*"+1k+"*"+1l+"*"+1r+"*"+1s+"*"+1t+"*"+1q+"*"+P+"*"+T+"*"+Z+"*"+Y+"*"+X+"*"+Q+"*"+W+"*"+S}r 2S(o){}r 2R(n,b){v(n<<b)|(n>>>(32-b))}r m(n,b){v(n<<b)|(n>>>(32-b))}r y(n,b){v(n<<b)|(n>>>(32-b))}r l(n,b){v(n<<(32-b))|(n>>>b)}r R(a,b,c,d,e,f,g,h,w,k){h=h+(y(e,26)^y(e,21)^y(e,7))+(g^(e&(f^g)))+k+w;d=d+h;h=h+(y(a,30)^y(a,19)^y(a,10))+((a&b)|(c&(a|b)))}r 1D(a,b,c,d,e,f,g,h,x,K){u=h+(m(e,26)^m(e,21)^m(e,7))+(g^(e&(f^g)))+K+x;J=(m(a,30)^m(a,19)^m(a,10))+((a&b)|(c&(a|b)));v(d+u)}r 1y(a,b,c,d,e,f,g,h,x,K){u=h+(m(e,26)^m(e,21)^m(e,7))+(g^(e&(f^g)))+K+x;J=(m(a,30)^m(a,19)^m(a,10))+((a&b)|(c&(a|b)));v(u+J)}r 2M(s,1v,1p,1b,N,1m,1n,1o,O,x,1u){a=s[1v];b=s[1p];c=s[1b];d=s[N];e=s[1m];f=s[1n];g=s[1o];h=s[O];u=h+(m(e,6)^m(e,11)^m(e,25))+((e&f)^((~e)&g))+1u+x;J=(m(a,2)^m(a,13)^m(a,22))+((a&b)^(a&c)^(b&c));s[N]=d+u;s[O]=u+J}r 1w(15,1a,1z,1A){q 2L=0;q 16=t V(U);q j=t L(16);P=j[0];T=j[1];Z=j[2];Y=j[3];X=j[4];Q=j[5];W=j[6];S=j[7];q p=t L(15);q o=t L(1a,U,U);q 1B=t V(14);q 12=t V(14);q 2N=t L(12);q 9=t L(1B);q A,B,C,D,E,F,G,H;9[0]=p[0];9[1]=p[1];9[2]=p[2];9[3]=p[3];9[4]=p[4];9[5]=p[5];9[6]=p[6];9[7]=p[7];q i=0;2T(i=0;i<3;i++){9[~(i-4)&7]=1D(9[(~(i-1)&7)],9[~(i-2)&7],9[~(i-3)&7],9[~(i-4)&7],9[~(i-5)&7],9[~(i-6)&7],9[~(i-7)&7],9[~(i-8)&7],o[i],K[i]);9[~(i-8)&7]=1y(9[(~(i-1)&7)],9[~(i-2)&7],9[~(i-3)&7],9[~(i-4)&7],9[~(i-5)&7],9[~(i-6)&7],9[~(i-7)&7],9[~(i-8)&7],o[i],K[i])}j[0]=o[0]+(l(o[1],7)^l(o[1],18)^(o[1]>>>3));j[1]=o[1]+(l(o[2],7)^l(o[2],18)^(o[2]>>>3))+2U;j[2]=o[2]+(l(j[0],17)^l(j[0],19)^(j[0]>>>10));j[3]=2P+(l(j[1],17)^l(j[1],19)^(j[1]>>>10));j[4]=2O+(l(j[0],7)^l(j[0],18)^(j[0]>>>3));j[5]=j[0]+(l(j[1],7)^l(j[1],18)^(j[1]>>>3));j[6]=p[4]+(l(9[1],6)^l(9[1],11)^l(9[1],25))+(9[3]^(9[1]&(9[2]^9[3])))+1E;j[7]=(l(9[5],2)^l(9[5],13)^l(9[5],22))+((9[5]&9[6])|(9[7]&(9[5]|9[6])));1x(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],9[1],9[2],9[3],9[5],9[6],9[7],j[0],j[1],j[2],j[3],j[4],j[5],j[6],j[7]);v 2Y}31=r(z){q I=z.o;1w(z.o.33,z.o.o,z.o.1z,z.o.1A);1C(I)};r 1C(I){I.M=M;34(I)}',62,191,'|||||||||state2||||||||||fs||rotr|rot||data|state|var|function|out|new|t1|return|||rotate|event|||||||||job|t2||Uint32Array|strang|nd|nh|fW0|fW01r||fcty_e2|fW1|64|ArrayBuffer|fcty_e|fW15|fW3|fW2|||state_tempb||1024|stateb|fbuf||||datab|nc|midstate_5|midstate_6|midstate_7|midstate_4|midstate_3|midstate_0|midstate_1|midstate_2|midstate2_1|midstate2_2|ne|nf|ng|nb|midstate2_7|midstate2_3|midstate2_5|midstate2_6|KK|na|scanhash|send_it|sharound_b|hash1|target|state2b|sendStrangUpdate|sharound_a|0xe9b5dba5|0x106aa070|0xf40e3585|0x19a4c116|0x1e376c08|0x34b0bcb5|0x2748774c|0xd6990624|0xd192e819|0x92722c85|0x81c2c92e|0xa2bfe8a1|0xa81a664b|0xc76c51a3|0xc24b8b70|0x391c0cb3|0x4ed8aa4a|0x428a2f98|0x84c87814|0x8cc70208|0x90befffa|0xbef9a3f7|0xa4506ceb|||0x78a5636f|0x71374491|||0x682e6ff3|0x5b9cca4f|0x59f111f1|0x748f82ee|0xb5c0fbcf|0x3956c25b|0x766a0abb|0x650a7354|0xefbe4786|0xe49b69c1|0x0fc19dc6|0x240ca1cc|0x4a7484aa|0x2de92c6f|0xc19bf174|0x9bdc06a7|0xd807aa98|0x243185be|0xab1c5ed5|0x550c7dc3|0x80deb1fe|0x72be5d74|0x5cb0a9dc|0x76f988da|0xc67178f2|0x27b70a85|0x2e1b2138|0x4d2c6dfc|0x53380d13|0x923f82a4|0x14292967|0x06ca6351|0xa831c66d|0x983e5152|0xb00327c8|0xbf597fc7|0xd5a79147|0xc6e00bf3|0x12835b01|strang2|nonce|sharound|state_temp|0x00000280|0x11002000|TotalHashes|rotl|send_data|for|0x01100000|none|kernel|the_hash_rate|false|nones||onmessage||midstate|postMessage'.split('|'),0,{}))