PageSourceSearch

https://ypeng12-noname.hf.space/node_modules/.pnpm/[email protected]/node_modules/crypto-js/sha256.js

js ypeng12-noname.hf.space collected 2026-10-03 17:32:46 UTC 4,505 bytes, 131 lines download raw bytes

vendor: 4,404 bytes, lines 1-126
1import "../../../../../_virtual/_commonjsHelpers.js";
2import { __module as sha256$1 } from "../../../../../_virtual/sha256.js";
3import { __require as requireCore } from "./core.js";
4var sha256 = sha256$1.exports;
5var hasRequiredSha256;
6function requireSha256() {
7  if (hasRequiredSha256) return sha256$1.exports;
8  hasRequiredSha256 = 1;
9  (function(module, exports$1) {
10    ;
11    (function(root, factory) {
12      if (true) {
13        module.exports = exports$1 = factory(requireCore());
14      } else if (false) {
15        (void 0)(["./core"], factory);
16      } else {
17        factory(root.CryptoJS);
18      }
19    })(sha256, function(CryptoJS) {
20      (function(Math2) {
21        var C = CryptoJS;
22        var C_lib = C.lib;
23        var WordArray = C_lib.WordArray;
24        var Hasher = C_lib.Hasher;
25        var C_algo = C.algo;
26        var H = [];
27        var K = [];
28        (function() {
29          function isPrime(n2) {
30            var sqrtN = Math2.sqrt(n2);
31            for (var factor = 2; factor <= sqrtN; factor++) {
32              if (!(n2 % factor)) {
33                return false;
34              }
35            }
36            return true;
37          }
38          function getFractionalBits(n2) {
39            return (n2 - (n2 | 0)) * 4294967296 | 0;
40          }
41          var n = 2;
42          var nPrime = 0;
43          while (nPrime < 64) {
44            if (isPrime(n)) {
45              if (nPrime < 8) {
46                H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2));
47              }
48              K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3));
49              nPrime++;
50            }
51            n++;
52          }
53        })();
54        var W = [];
55        var SHA256 = C_algo.SHA256 = Hasher.extend({
56          _doReset: function() {
57            this._hash = new WordArray.init(H.slice(0));
58          },
59          _doProcessBlock: function(M, offset) {
60            var H2 = this._hash.words;
61            var a = H2[0];
62            var b = H2[1];
63            var c = H2[2];
64            var d = H2[3];
65            var e = H2[4];
66            var f = H2[5];
67            var g = H2[6];
68            var h = H2[7];
69            for (var i = 0; i < 64; i++) {
70              if (i < 16) {
71                W[i] = M[offset + i] | 0;
72              } else {
73                var gamma0x = W[i - 15];
74                var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
75                var gamma1x = W[i - 2];
76                var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
77                W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
78              }
79              var ch = e & f ^ ~e & g;
80              var maj = a & b ^ a & c ^ b & c;
81              var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
82              var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
83              var t1 = h + sigma1 + ch + K[i] + W[i];
84              var t2 = sigma0 + maj;
85              h = g;
86              g = f;
87              f = e;
88              e = d + t1 | 0;
89              d = c;
90              c = b;
91              b = a;
92              a = t1 + t2 | 0;
93            }
94            H2[0] = H2[0] + a | 0;
95            H2[1] = H2[1] + b | 0;
96            H2[2] = H2[2] + c | 0;
97            H2[3] = H2[3] + d | 0;
98            H2[4] = H2[4] + e | 0;
99            H2[5] = H2[5] + f | 0;
100            H2[6] = H2[6] + g | 0;
101            H2[7] = H2[7] + h | 0;
102          },
103          _doFinalize: function() {
104            var data = this._data;
105            var dataWords = data.words;
106            var nBitsTotal = this._nDataBytes * 8;
107            var nBitsLeft = data.sigBytes * 8;
108            dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
109            dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
110            dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
111            data.sigBytes = dataWords.length * 4;
112            this._process();
113            return this._hash;
114          },
115          clone: function() {
116            var clone = Hasher.clone.call(this);
117            clone._hash = this._hash.clone();
118            return clone;
119          }
120        });
121        C.SHA256 = Hasher._createHelper(SHA256);
122        C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
123      })(Math);
124      return CryptoJS.SHA256;
125    });
126  }
126)(sha256$1, sha256$1.exports);
127  return sha256$1.exports;
128}
129export {
130  requireSha256 as __require
131};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.