PageSourceSearch

https://hxyswgc.com/manager/js/md5.js

js hxyswgc.com collected 2026-10-08 12:16:34 UTC 7,729 bytes, 197 lines download raw bytes

vendor: 4,238 bytes, lines 1-125
1	(function($){
2		
3		var rotateLeft = function(lValue, iShiftBits) {
4			return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
5		}
6		
7		var addUnsigned = function(lX, lY) {
8			var lX4, lY4, lX8, lY8, lResult;
9			lX8 = (lX & 0x80000000);
10			lY8 = (lY & 0x80000000);
11			lX4 = (lX & 0x40000000);
12			lY4 = (lY & 0x40000000);
13			lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
14			if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
15			if (lX4 | lY4) {
16				if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
17				else return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
18			} else {
19				return (lResult ^ lX8 ^ lY8);
20			}
21		}
22		
23		var F = function(x, y, z) {
24			return (x & y) | ((~ x) & z);
25		}
26		
27		var G = function(x, y, z) {
28			return (x & z) | (y & (~ z));
29		}
30		
31		var H = function(x, y, z) {
32			return (x ^ y ^ z);
33		}
34		
35		var I = function(x, y, z) {
36			return (y ^ (x | (~ z)));
37		}
38		
39		var FF = function(a, b, c, d, x, s, ac) {
40			a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
41			return addUnsigned(rotateLeft(a, s), b);
42		};
43		
44		var GG = function(a, b, c, d, x, s, ac) {
45			a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
46			return addUnsigned(rotateLeft(a, s), b);
47		};
48		
49		var HH = function(a, b, c, d, x, s, ac) {
50			a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
51			return addUnsigned(rotateLeft(a, s), b);
52		};
53		
54		var II = function(a, b, c, d, x, s, ac) {
55			a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
56			return addUnsigned(rotateLeft(a, s), b);
57		};
58		
59		var convertToWordArray = function(string) {
60			var lWordCount;
61			var lMessageLength = string.length;
62			var lNumberOfWordsTempOne = lMessageLength + 8;
63			var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64;
64			var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16;
65			var lWordArray = Array(lNumberOfWords - 1);
66			var lBytePosition = 0;
67			var lByteCount = 0;
68			while (lByteCount < lMessageLength) {
69				lWordCount = (lByteCount - (lByteCount % 4)) / 4;
70				lBytePosition = (lByteCount % 4) * 8;
71				lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
72				lByteCount++;
73			}
74			lWordCount = (lByteCount - (lByteCount % 4)) / 4;
75			lBytePosition = (lByteCount % 4) * 8;
76			lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
77			lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
78			lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
79			return lWordArray;
80		};
81		
82		var wordToHex = function(lValue) {
83			var WordToHexValue = "", WordToHexValueTemp = "", lByte, lCount;
84			for (lCount = 0; lCount <= 3; lCount++) {
85				lByte = (lValue >>> (lCount * 8)) & 255;
86				WordToHexValueTemp = "0" + lByte.toString(16);
87				WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2);
88			}
89			return WordToHexValue;
90		};
91		
92		var uTF8Encode = function(string) {
93			string = string.replace(/\x0d\x0a/g, "\x0a");
94			var output = "";
95			for (var n = 0; n < string.length; n++) {
96				var c = string.charCodeAt(n);
97				if (c < 128) {
98					output += String.fromCharCode(c);
99				} else if ((c > 127) && (c < 2048)) {
100					output += String.fromCharCode((c >> 6) | 192);
101					output += String.fromCharCode((c & 63) | 128);
102				} else {
103					output += String.fromCharCode((c >> 12) | 224);
104					output += String.fromCharCode(((c >> 6) & 63) | 128);
105					output += String.fromCharCode((c & 63) | 128);
106				}
107			}
108			return output;
109		};
110		
111		$.extend({
112			md5: function(string) {
113				var x = Array();
114				var k, AA, BB, CC, DD, a, b, c, d;
115				var S11=7, S12=12, S13=17, S14=22;
116				var S21=5, S22=9 , S23=14, S24=20;
117				var S31=4, S32=11, S33=16, S34=23;
118				var S41=6, S42=10, S43=15, S44=21;
119				string = uTF8Encode(string);
120				x = convertToWordArray(string);
121				a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
122				for (k = 0; k < x.length; k += 16) {
123					AA = a; BB = b; CC = c; DD = d;
124					a = FF(a, b, c, d, x[k+0],  S11, 0xD76AA478);
125					d = FF(d, a, b, c, x[k+1],  S12, 0xE8C7B756);
126					c = FF(c, d, a, b, x[k+2],  S13, 0x242070DB);
127					b = FF(b, c, d, a, x[k+3],  S14, 0xC1BDCEEE);
128					a = FF(a, b, c, d, x[k+4],  S11, 0xF57C0FAF);
129					d = FF(d, a, b, c, x[k+5],  S12, 0x4787C62A);
130					c = FF(c, d, a, b, x[k+6],  S13, 0xA8304613);
131					b = FF(b, c, d, a, x[k+7],  S14, 0xFD469501);
132					a = FF(a, b, c, d, x[k+8],  S11, 0x698098D8);
133					d = FF(d, a, b, c, x[k+9],  S12, 0x8B44F7AF);
134					c = FF(c, d, a, b, x[k+10], S13, 0xFFFF5BB1);
135					b = FF(b, c, d, a, x[k+11], S14, 0x895CD7BE);
136					a = FF(a, b, c, d, x[k+12], S11, 0x6B901122);
137					d = FF(d, a, b, c, x[k+13], S12, 0xFD987193);
138					c = FF(c, d, a, b, x[k+14], S13, 0xA679438E);
139					b = FF(b, c, d, a, x[k+15], S14, 0x49B40821);
140					a = GG(a, b, c, d, x[k+1],  S21, 0xF61E2562);
141					d = GG(d, a, b, c, x[k+6],  S22, 0xC040B340);
142					c = GG(c, d, a, b, x[k+11], S23, 0x265E5A51);
143					b = GG(b, c, d, a, x[k+0],  S24, 0xE9B6C7AA);
144					a = GG(a, b, c, d, x[k+5],  S21, 0xD62F105D);
145					d = GG(d, a, b, c, x[k+10], S22, 0x2441453);
146					c = GG(c, d, a, b, x[k+15], S23, 0xD8A1E681);
147					b = GG(b, c, d, a, x[k+4],  S24, 0xE7D3FBC8);
148					a = GG(a, b, c, d, x[k+9],  S21, 0x21E1CDE6);
149					d = GG(d, a, b, c, x[k+14], S22, 0xC33707D6);
150					c = GG(c, d, a, b, x[k+3],  S23, 0xF4D50D87);
151					b = GG(b, c, d, a, x[k+8],  S24, 0x455A14ED);
152					a = GG(a, b, c, d, x[k+13], S21, 0xA9E3E905);
153					d = GG(d, a, b, c, x[k+2],  S22, 0xFCEFA3F8);
154					c = GG(c, d, a, b, x[k+7],  S23, 0x676F02D9);
155					b = GG(b, c, d, a, x[k+12], S24, 0x8D2A4C8A);
156					a = HH(a, b, c, d, x[k+5],  S31, 0xFFFA3942);
157					d = HH(d, a, b, c, x[k+8],  S32, 0x8771F681);
158					c = HH(c, d, a, b, x[k+11], S33, 0x6D9D6122);
159					b = HH(b, c, d, a, x[k+14], S34, 0xFDE5380C);
160					a = HH(a, b, c, d, x[k+1],  S31, 0xA4BEEA44);
161					d = HH(d, a, b, c, x[k+4],  S32, 0x4BDECFA9);
162					c = HH(c, d, a, b, x[k+7],  S33, 0xF6BB4B60);
163					b = HH(b, c, d, a, x[k+10], S34, 0xBEBFBC70);
164					a = HH(a, b, c, d, x[k+13], S31, 0x289B7EC6);
165					d = HH(d, a, b, c, x[k+0],  S32, 0xEAA127FA);
166					c = HH(c, d, a, b, x[k+3],  S33, 0xD4EF3085);
167					b = HH(b, c, d, a, x[k+6],  S34, 0x4881D05);
168					a = HH(a, b, c, d, x[k+9],  S31, 0xD9D4D039);
169					d = HH(d, a, b, c, x[k+12], S32, 0xE6DB99E5);
170					c = HH(c, d, a, b, x[k+15], S33, 0x1FA27CF8);
171					b = HH(b, c, d, a, x[k+2],  S34, 0xC4AC5665);
172					a = II(a, b, c, d, x[k+0],  S41, 0xF4292244);
173					d = II(d, a, b, c, x[k+7],  S42, 0x432AFF97);
174					c = II(c, d, a, b, x[k+14], S43, 0xAB9423A7);
175					b = II(b, c, d, a, x[k+5],  S44, 0xFC93A039);
176					a = II(a, b, c, d, x[k+12], S41, 0x655B59C3);
177					d = II(d, a, b, c, x[k+3],  S42, 0x8F0CCC92);
178					c = II(c, d, a, b, x[k+10], S43, 0xFFEFF47D);
179					b = II(b, c, d, a, x[k+1],  S44, 0x85845DD1);
180					a = II(a, b, c, d, x[k+8],  S41, 0x6FA87E4F);
181					d = II(d, a, b, c, x[k+15], S42, 0xFE2CE6E0);
182					c = II(c, d, a, b, x[k+6],  S43, 0xA3014314);
183					b = II(b, c, d, a, x[k+13], S44, 0x4E0811A1);
184					a = II(a, b, c, d, x[k+4],  S41, 0xF7537E82);
185					d = II(d, a, b, c, x[k+11], S42, 0xBD3AF235);
186					c = II(c, d, a, b, x[k+2],  S43, 0x2AD7D2BB);
187					b = II(b, c, d, a, x[k+9],  S44, 0xEB86D391);
188					a = addUnsigned(a, AA);
189					b = addUnsigned(b, BB);
190					c = addUnsigned(c, CC);
191					d = addUnsigned(d, DD);
192				}
193				var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
194				return tempValue.toLowerCase();
195			}
196		});
197	})(jQuery);

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.