pixel-react 1.14.87 → 1.14.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -75
- package/lib/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/_virtual/index12.js +2 -2
- package/lib/_virtual/index9.js +2 -2
- package/lib/assets/icons/dataset_list.svg.js +1 -1
- package/lib/assets/icons/dataset_list.svg.js.map +1 -1
- package/lib/assets/icons/spinner.svg.js +1 -1
- package/lib/assets/icons/spinner.svg.js.map +1 -1
- package/lib/components/Chip/Chip.js +1 -1
- package/lib/components/Chip/Chip.js.map +1 -1
- package/lib/components/NLPInput/components/NlpDropDown/NlpDropdown.js +9 -0
- package/lib/components/NLPInput/components/NlpDropDown/NlpDropdown.js.map +1 -1
- package/lib/components/Select/Select.js +3 -2
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/index.cjs +1362 -6766
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouType.js +6 -8
- package/lib/node_modules/libphonenumber-js/es6/AsYouType.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js +41 -28
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js +21 -17
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/format.js +50 -91
- package/lib/node_modules/libphonenumber-js/es6/format.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +39 -6
- package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +13 -10
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +10 -8
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +15 -5
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +2 -2
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +30 -8
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isPossible.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/isPossible.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/metadata.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/metadata.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parse.js +9 -7
- package/lib/node_modules/libphonenumber-js/es6/parse.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +7 -7
- package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/metadata.min.json.js +11 -11
- package/lib/node_modules/libphonenumber-js/metadata.min.json.js.map +1 -1
- package/lib/node_modules/prop-types/index.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js +33 -21
- package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js +41 -0
- package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +3 -2
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +3 -2
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js.map +1 -1
- package/lib/node_modules/react-hook-form/dist/index.esm.js +60 -38
- package/lib/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/lib/node_modules/react-virtuoso/dist/index.js +397 -397
- package/lib/node_modules/react-virtuoso/dist/index.js.map +1 -1
- package/lib/node_modules/ua-parser-js/src/ua-parser.js +85 -71
- package/lib/node_modules/ua-parser-js/src/ua-parser.js.map +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.d.ts +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.js +17 -8
- package/lib/utils/getEncryptedData/getEncryptedData.js.map +1 -1
- package/package.json +106 -107
- package/lib/node_modules/jsencrypt/lib/JSEncrypt.js +0 -246
- package/lib/node_modules/jsencrypt/lib/JSEncrypt.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +0 -325
- package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/index.js +0 -6
- package/lib/node_modules/jsencrypt/lib/index.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +0 -570
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js +0 -88
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js +0 -66
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js +0 -87
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js +0 -65
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +0 -1700
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +0 -48
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js +0 -77
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +0 -415
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js +0 -307
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js +0 -61
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js.map +0 -1
- package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +0 -1559
- package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js.map +0 -1
@@ -1,307 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
|
3
|
-
* in FIPS 180-2
|
4
|
-
* Version 2.2 Copyright Angel Marin, Paul Johnston 2000 - 2009.
|
5
|
-
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
6
|
-
* Distributed under the BSD License
|
7
|
-
* See http://pajhome.org.uk/crypt/md5 for details.
|
8
|
-
* Also http://anmar.eu.org/projects/jssha2/
|
9
|
-
*/
|
10
|
-
// /*
|
11
|
-
// * Configurable variables. You may need to tweak these to be compatible with
|
12
|
-
// * the server-side, but the defaults work in most cases.
|
13
|
-
// */
|
14
|
-
// var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
|
15
|
-
// var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
|
16
|
-
// /*
|
17
|
-
// * These are the functions you'll usually want to call
|
18
|
-
// * They take string arguments and return either hex or base-64 encoded strings
|
19
|
-
// */
|
20
|
-
// function hex_sha256(s: string) {
|
21
|
-
// return rstr2hex(rstr_sha256(str2rstr_utf8(s)));
|
22
|
-
// }
|
23
|
-
// function b64_sha256(s: string) {
|
24
|
-
// return rstr2b64(rstr_sha256(str2rstr_utf8(s)));
|
25
|
-
// }
|
26
|
-
// function any_sha256(s: string, e: any) {
|
27
|
-
// return rstr2any(rstr_sha256(str2rstr_utf8(s)), e);
|
28
|
-
// }
|
29
|
-
// function hex_hmac_sha256(k: string, d: any) {
|
30
|
-
// return rstr2hex(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d)));
|
31
|
-
// }
|
32
|
-
// function b64_hmac_sha256(k: string, d: any) {
|
33
|
-
// return rstr2b64(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d)));
|
34
|
-
// }
|
35
|
-
// function any_hmac_sha256(k: string, d: string, e: any) {
|
36
|
-
// return rstr2any(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d)), e);
|
37
|
-
// }
|
38
|
-
// /*
|
39
|
-
// * Perform a simple self-test to see if the VM is working
|
40
|
-
// */
|
41
|
-
// function sha256_vm_test() {
|
42
|
-
// return (
|
43
|
-
// hex_sha256("abc").toLowerCase() ==
|
44
|
-
// "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
|
45
|
-
// );
|
46
|
-
// }
|
47
|
-
/*
|
48
|
-
* Calculate the sha256 of a raw string
|
49
|
-
*/
|
50
|
-
function rstr_sha256(s) {
|
51
|
-
return binb2rstr(binb_sha256(rstr2binb(s), s.length * 8));
|
52
|
-
}
|
53
|
-
// /*
|
54
|
-
// * Calculate the HMAC-sha256 of a key and some data (raw strings)
|
55
|
-
// */
|
56
|
-
// function rstr_hmac_sha256(key: string, data: any) {
|
57
|
-
// var bkey = rstr2binb(key);
|
58
|
-
// if (bkey.length > 16) bkey = binb_sha256(bkey, key.length * 8);
|
59
|
-
// var ipad = Array(16),
|
60
|
-
// opad = Array(16);
|
61
|
-
// for (var i = 0; i < 16; i++) {
|
62
|
-
// ipad[i] = bkey[i] ^ 0x36363636;
|
63
|
-
// opad[i] = bkey[i] ^ 0x5c5c5c5c;
|
64
|
-
// }
|
65
|
-
// var hash = binb_sha256(ipad.concat(rstr2binb(data)), 512 + data.length * 8);
|
66
|
-
// return binb2rstr(binb_sha256(opad.concat(hash), 512 + 256));
|
67
|
-
// }
|
68
|
-
// /*
|
69
|
-
// * Convert a raw string to a hex string
|
70
|
-
// */
|
71
|
-
function rstr2hex(input) {
|
72
|
-
var hex_tab = "0123456789abcdef";
|
73
|
-
var output = "";
|
74
|
-
for (var i = 0; i < input.length; i++) {
|
75
|
-
var x = input.charCodeAt(i);
|
76
|
-
output += hex_tab.charAt(x >>> 4 & 0x0f) + hex_tab.charAt(x & 0x0f);
|
77
|
-
}
|
78
|
-
return output;
|
79
|
-
}
|
80
|
-
// /*
|
81
|
-
// * Convert a raw string to a base-64 string
|
82
|
-
// */
|
83
|
-
// function rstr2b64(input: string) {
|
84
|
-
// try {
|
85
|
-
// b64pad;
|
86
|
-
// } catch (e) {
|
87
|
-
// b64pad = "";
|
88
|
-
// }
|
89
|
-
// var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
90
|
-
// var output = "";
|
91
|
-
// var len = input.length;
|
92
|
-
// for (var i = 0; i < len; i += 3) {
|
93
|
-
// var triplet =
|
94
|
-
// (input.charCodeAt(i) << 16) |
|
95
|
-
// (i + 1 < len ? input.charCodeAt(i + 1) << 8 : 0) |
|
96
|
-
// (i + 2 < len ? input.charCodeAt(i + 2) : 0);
|
97
|
-
// for (var j = 0; j < 4; j++) {
|
98
|
-
// if (i * 8 + j * 6 > input.length * 8) output += b64pad;
|
99
|
-
// else output += tab.charAt((triplet >>> (6 * (3 - j))) & 0x3f);
|
100
|
-
// }
|
101
|
-
// }
|
102
|
-
// return output;
|
103
|
-
// }
|
104
|
-
// /*
|
105
|
-
// * Convert a raw string to an arbitrary string encoding
|
106
|
-
// */
|
107
|
-
// function rstr2any(input: string, encoding: string) {
|
108
|
-
// var divisor = encoding.length;
|
109
|
-
// var remainders = Array();
|
110
|
-
// var i, q, x, quotient;
|
111
|
-
// /* Convert to an array of 16-bit big-endian values, forming the dividend */
|
112
|
-
// var dividend = Array(Math.ceil(input.length / 2));
|
113
|
-
// for (i = 0; i < dividend.length; i++) {
|
114
|
-
// dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
|
115
|
-
// }
|
116
|
-
// /*
|
117
|
-
// * Repeatedly perform a long division. The binary array forms the dividend,
|
118
|
-
// * the length of the encoding is the divisor. Once computed, the quotient
|
119
|
-
// * forms the dividend for the next step. We stop when the dividend is zero.
|
120
|
-
// * All remainders are stored for later use.
|
121
|
-
// */
|
122
|
-
// while (dividend.length > 0) {
|
123
|
-
// quotient = Array();
|
124
|
-
// x = 0;
|
125
|
-
// for (i = 0; i < dividend.length; i++) {
|
126
|
-
// x = (x << 16) + dividend[i];
|
127
|
-
// q = Math.floor(x / divisor);
|
128
|
-
// x -= q * divisor;
|
129
|
-
// if (quotient.length > 0 || q > 0) quotient[quotient.length] = q;
|
130
|
-
// }
|
131
|
-
// remainders[remainders.length] = x;
|
132
|
-
// dividend = quotient;
|
133
|
-
// }
|
134
|
-
// /* Convert the remainders to the output string */
|
135
|
-
// var output = "";
|
136
|
-
// for (i = remainders.length - 1; i >= 0; i--) output += encoding.charAt(remainders[i]);
|
137
|
-
// /* Append leading zero equivalents */
|
138
|
-
// var full_length = Math.ceil(
|
139
|
-
// (input.length * 8) / (Math.log(encoding.length) / Math.log(2)),
|
140
|
-
// );
|
141
|
-
// for (i = output.length; i < full_length; i++) output = encoding[0] + output;
|
142
|
-
// return output;
|
143
|
-
// }
|
144
|
-
// /*
|
145
|
-
// * Encode a string as utf-8.
|
146
|
-
// * For efficiency, this assumes the input is valid utf-16.
|
147
|
-
// */
|
148
|
-
// function str2rstr_utf8(input: string) {
|
149
|
-
// var output = "";
|
150
|
-
// var i = -1;
|
151
|
-
// var x, y;
|
152
|
-
// while (++i < input.length) {
|
153
|
-
// /* Decode utf-16 surrogate pairs */
|
154
|
-
// x = input.charCodeAt(i);
|
155
|
-
// y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
|
156
|
-
// if (0xd800 <= x && x <= 0xdbff && 0xdc00 <= y && y <= 0xdfff) {
|
157
|
-
// x = 0x10000 + ((x & 0x03ff) << 10) + (y & 0x03ff);
|
158
|
-
// i++;
|
159
|
-
// }
|
160
|
-
// /* Encode output as utf-8 */
|
161
|
-
// if (x <= 0x7f) output += String.fromCharCode(x);
|
162
|
-
// else if (x <= 0x7ff)
|
163
|
-
// output += String.fromCharCode(0xc0 | ((x >>> 6) & 0x1f), 0x80 | (x & 0x3f));
|
164
|
-
// else if (x <= 0xffff)
|
165
|
-
// output += String.fromCharCode(
|
166
|
-
// 0xe0 | ((x >>> 12) & 0x0f),
|
167
|
-
// 0x80 | ((x >>> 6) & 0x3f),
|
168
|
-
// 0x80 | (x & 0x3f),
|
169
|
-
// );
|
170
|
-
// else if (x <= 0x1fffff)
|
171
|
-
// output += String.fromCharCode(
|
172
|
-
// 0xf0 | ((x >>> 18) & 0x07),
|
173
|
-
// 0x80 | ((x >>> 12) & 0x3f),
|
174
|
-
// 0x80 | ((x >>> 6) & 0x3f),
|
175
|
-
// 0x80 | (x & 0x3f),
|
176
|
-
// );
|
177
|
-
// }
|
178
|
-
// return output;
|
179
|
-
// }
|
180
|
-
// /*
|
181
|
-
// * Encode a string as utf-16
|
182
|
-
// */
|
183
|
-
// function str2rstr_utf16le(input: string) {
|
184
|
-
// var output = "";
|
185
|
-
// for (var i = 0; i < input.length; i++)
|
186
|
-
// output += String.fromCharCode(
|
187
|
-
// input.charCodeAt(i) & 0xff,
|
188
|
-
// (input.charCodeAt(i) >>> 8) & 0xff,
|
189
|
-
// );
|
190
|
-
// return output;
|
191
|
-
// }
|
192
|
-
// function str2rstr_utf16be(input: string) {
|
193
|
-
// var output = "";
|
194
|
-
// for (var i = 0; i < input.length; i++)
|
195
|
-
// output += String.fromCharCode(
|
196
|
-
// (input.charCodeAt(i) >>> 8) & 0xff,
|
197
|
-
// input.charCodeAt(i) & 0xff,
|
198
|
-
// );
|
199
|
-
// return output;
|
200
|
-
// }
|
201
|
-
/*
|
202
|
-
* Convert a raw string to an array of big-endian words
|
203
|
-
* Characters >255 have their high-byte silently ignored.
|
204
|
-
*/
|
205
|
-
function rstr2binb(input) {
|
206
|
-
var output = Array(input.length >> 2);
|
207
|
-
for (var i = 0; i < output.length; i++) output[i] = 0;
|
208
|
-
for (var i = 0; i < input.length * 8; i += 8) output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << 24 - i % 32;
|
209
|
-
return output;
|
210
|
-
}
|
211
|
-
/*
|
212
|
-
* Convert an array of big-endian words to a string
|
213
|
-
*/
|
214
|
-
function binb2rstr(input) {
|
215
|
-
var output = "";
|
216
|
-
for (var i = 0; i < input.length * 32; i += 8) output += String.fromCharCode(input[i >> 5] >>> 24 - i % 32 & 0xff);
|
217
|
-
return output;
|
218
|
-
}
|
219
|
-
/*
|
220
|
-
* Main sha256 function, with its support functions
|
221
|
-
*/
|
222
|
-
function sha256_S(X, n) {
|
223
|
-
return X >>> n | X << 32 - n;
|
224
|
-
}
|
225
|
-
function sha256_R(X, n) {
|
226
|
-
return X >>> n;
|
227
|
-
}
|
228
|
-
function sha256_Ch(x, y, z) {
|
229
|
-
return x & y ^ ~x & z;
|
230
|
-
}
|
231
|
-
function sha256_Maj(x, y, z) {
|
232
|
-
return x & y ^ x & z ^ y & z;
|
233
|
-
}
|
234
|
-
function sha256_Sigma0256(x) {
|
235
|
-
return sha256_S(x, 2) ^ sha256_S(x, 13) ^ sha256_S(x, 22);
|
236
|
-
}
|
237
|
-
function sha256_Sigma1256(x) {
|
238
|
-
return sha256_S(x, 6) ^ sha256_S(x, 11) ^ sha256_S(x, 25);
|
239
|
-
}
|
240
|
-
function sha256_Gamma0256(x) {
|
241
|
-
return sha256_S(x, 7) ^ sha256_S(x, 18) ^ sha256_R(x, 3);
|
242
|
-
}
|
243
|
-
function sha256_Gamma1256(x) {
|
244
|
-
return sha256_S(x, 17) ^ sha256_S(x, 19) ^ sha256_R(x, 10);
|
245
|
-
}
|
246
|
-
// function sha256_Sigma0512(x: number) {
|
247
|
-
// return sha256_S(x, 28) ^ sha256_S(x, 34) ^ sha256_S(x, 39);
|
248
|
-
// }
|
249
|
-
// function sha256_Sigma1512(x: number) {
|
250
|
-
// return sha256_S(x, 14) ^ sha256_S(x, 18) ^ sha256_S(x, 41);
|
251
|
-
// }
|
252
|
-
// function sha256_Gamma0512(x: number) {
|
253
|
-
// return sha256_S(x, 1) ^ sha256_S(x, 8) ^ sha256_R(x, 7);
|
254
|
-
// }
|
255
|
-
// function sha256_Gamma1512(x: number) {
|
256
|
-
// return sha256_S(x, 19) ^ sha256_S(x, 61) ^ sha256_R(x, 6);
|
257
|
-
// }
|
258
|
-
var sha256_K = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998);
|
259
|
-
function binb_sha256(m, l) {
|
260
|
-
var HASH = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225);
|
261
|
-
var W = new Array(64);
|
262
|
-
var a, b, c, d, e, f, g, h;
|
263
|
-
var i, j, T1, T2;
|
264
|
-
/* append padding */
|
265
|
-
m[l >> 5] |= 0x80 << 24 - l % 32;
|
266
|
-
m[(l + 64 >> 9 << 4) + 15] = l;
|
267
|
-
for (i = 0; i < m.length; i += 16) {
|
268
|
-
a = HASH[0];
|
269
|
-
b = HASH[1];
|
270
|
-
c = HASH[2];
|
271
|
-
d = HASH[3];
|
272
|
-
e = HASH[4];
|
273
|
-
f = HASH[5];
|
274
|
-
g = HASH[6];
|
275
|
-
h = HASH[7];
|
276
|
-
for (j = 0; j < 64; j++) {
|
277
|
-
if (j < 16) W[j] = m[j + i];else W[j] = safe_add(safe_add(safe_add(sha256_Gamma1256(W[j - 2]), W[j - 7]), sha256_Gamma0256(W[j - 15])), W[j - 16]);
|
278
|
-
T1 = safe_add(safe_add(safe_add(safe_add(h, sha256_Sigma1256(e)), sha256_Ch(e, f, g)), sha256_K[j]), W[j]);
|
279
|
-
T2 = safe_add(sha256_Sigma0256(a), sha256_Maj(a, b, c));
|
280
|
-
h = g;
|
281
|
-
g = f;
|
282
|
-
f = e;
|
283
|
-
e = safe_add(d, T1);
|
284
|
-
d = c;
|
285
|
-
c = b;
|
286
|
-
b = a;
|
287
|
-
a = safe_add(T1, T2);
|
288
|
-
}
|
289
|
-
HASH[0] = safe_add(a, HASH[0]);
|
290
|
-
HASH[1] = safe_add(b, HASH[1]);
|
291
|
-
HASH[2] = safe_add(c, HASH[2]);
|
292
|
-
HASH[3] = safe_add(d, HASH[3]);
|
293
|
-
HASH[4] = safe_add(e, HASH[4]);
|
294
|
-
HASH[5] = safe_add(f, HASH[5]);
|
295
|
-
HASH[6] = safe_add(g, HASH[6]);
|
296
|
-
HASH[7] = safe_add(h, HASH[7]);
|
297
|
-
}
|
298
|
-
return HASH;
|
299
|
-
}
|
300
|
-
function safe_add(x, y) {
|
301
|
-
var lsw = (x & 0xffff) + (y & 0xffff);
|
302
|
-
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
303
|
-
return msw << 16 | lsw & 0xffff;
|
304
|
-
}
|
305
|
-
|
306
|
-
export { rstr2hex, rstr_sha256 };
|
307
|
-
//# sourceMappingURL=sha256.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"sha256.js","sources":["../../../../../../node_modules/jsencrypt/lib/lib/jsbn/sha256.js"],"sourcesContent":["/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2 Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n * Also http://anmar.eu.org/projects/jssha2/\n */\n// /*\n// * Configurable variables. You may need to tweak these to be compatible with\n// * the server-side, but the defaults work in most cases.\n// */\n// var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */\n// var b64pad = \"\"; /* base-64 pad character. \"=\" for strict RFC compliance */\n// /*\n// * These are the functions you'll usually want to call\n// * They take string arguments and return either hex or base-64 encoded strings\n// */\n// function hex_sha256(s: string) {\n// return rstr2hex(rstr_sha256(str2rstr_utf8(s)));\n// }\n// function b64_sha256(s: string) {\n// return rstr2b64(rstr_sha256(str2rstr_utf8(s)));\n// }\n// function any_sha256(s: string, e: any) {\n// return rstr2any(rstr_sha256(str2rstr_utf8(s)), e);\n// }\n// function hex_hmac_sha256(k: string, d: any) {\n// return rstr2hex(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d)));\n// }\n// function b64_hmac_sha256(k: string, d: any) {\n// return rstr2b64(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d)));\n// }\n// function any_hmac_sha256(k: string, d: string, e: any) {\n// return rstr2any(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d)), e);\n// }\n// /*\n// * Perform a simple self-test to see if the VM is working\n// */\n// function sha256_vm_test() {\n// return (\n// hex_sha256(\"abc\").toLowerCase() ==\n// \"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad\"\n// );\n// }\n/*\n * Calculate the sha256 of a raw string\n */\nexport function rstr_sha256(s) {\n return binb2rstr(binb_sha256(rstr2binb(s), s.length * 8));\n}\n// /*\n// * Calculate the HMAC-sha256 of a key and some data (raw strings)\n// */\n// function rstr_hmac_sha256(key: string, data: any) {\n// var bkey = rstr2binb(key);\n// if (bkey.length > 16) bkey = binb_sha256(bkey, key.length * 8);\n// var ipad = Array(16),\n// opad = Array(16);\n// for (var i = 0; i < 16; i++) {\n// ipad[i] = bkey[i] ^ 0x36363636;\n// opad[i] = bkey[i] ^ 0x5c5c5c5c;\n// }\n// var hash = binb_sha256(ipad.concat(rstr2binb(data)), 512 + data.length * 8);\n// return binb2rstr(binb_sha256(opad.concat(hash), 512 + 256));\n// }\n// /*\n// * Convert a raw string to a hex string\n// */\nexport function rstr2hex(input) {\n var hex_tab = \"0123456789abcdef\";\n var output = \"\";\n for (var i = 0; i < input.length; i++) {\n var x = input.charCodeAt(i);\n output += hex_tab.charAt((x >>> 4) & 0x0f) + hex_tab.charAt(x & 0x0f);\n }\n return output;\n}\n// /*\n// * Convert a raw string to a base-64 string\n// */\n// function rstr2b64(input: string) {\n// try {\n// b64pad;\n// } catch (e) {\n// b64pad = \"\";\n// }\n// var tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n// var output = \"\";\n// var len = input.length;\n// for (var i = 0; i < len; i += 3) {\n// var triplet =\n// (input.charCodeAt(i) << 16) |\n// (i + 1 < len ? input.charCodeAt(i + 1) << 8 : 0) |\n// (i + 2 < len ? input.charCodeAt(i + 2) : 0);\n// for (var j = 0; j < 4; j++) {\n// if (i * 8 + j * 6 > input.length * 8) output += b64pad;\n// else output += tab.charAt((triplet >>> (6 * (3 - j))) & 0x3f);\n// }\n// }\n// return output;\n// }\n// /*\n// * Convert a raw string to an arbitrary string encoding\n// */\n// function rstr2any(input: string, encoding: string) {\n// var divisor = encoding.length;\n// var remainders = Array();\n// var i, q, x, quotient;\n// /* Convert to an array of 16-bit big-endian values, forming the dividend */\n// var dividend = Array(Math.ceil(input.length / 2));\n// for (i = 0; i < dividend.length; i++) {\n// dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);\n// }\n// /*\n// * Repeatedly perform a long division. The binary array forms the dividend,\n// * the length of the encoding is the divisor. Once computed, the quotient\n// * forms the dividend for the next step. We stop when the dividend is zero.\n// * All remainders are stored for later use.\n// */\n// while (dividend.length > 0) {\n// quotient = Array();\n// x = 0;\n// for (i = 0; i < dividend.length; i++) {\n// x = (x << 16) + dividend[i];\n// q = Math.floor(x / divisor);\n// x -= q * divisor;\n// if (quotient.length > 0 || q > 0) quotient[quotient.length] = q;\n// }\n// remainders[remainders.length] = x;\n// dividend = quotient;\n// }\n// /* Convert the remainders to the output string */\n// var output = \"\";\n// for (i = remainders.length - 1; i >= 0; i--) output += encoding.charAt(remainders[i]);\n// /* Append leading zero equivalents */\n// var full_length = Math.ceil(\n// (input.length * 8) / (Math.log(encoding.length) / Math.log(2)),\n// );\n// for (i = output.length; i < full_length; i++) output = encoding[0] + output;\n// return output;\n// }\n// /*\n// * Encode a string as utf-8.\n// * For efficiency, this assumes the input is valid utf-16.\n// */\n// function str2rstr_utf8(input: string) {\n// var output = \"\";\n// var i = -1;\n// var x, y;\n// while (++i < input.length) {\n// /* Decode utf-16 surrogate pairs */\n// x = input.charCodeAt(i);\n// y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;\n// if (0xd800 <= x && x <= 0xdbff && 0xdc00 <= y && y <= 0xdfff) {\n// x = 0x10000 + ((x & 0x03ff) << 10) + (y & 0x03ff);\n// i++;\n// }\n// /* Encode output as utf-8 */\n// if (x <= 0x7f) output += String.fromCharCode(x);\n// else if (x <= 0x7ff)\n// output += String.fromCharCode(0xc0 | ((x >>> 6) & 0x1f), 0x80 | (x & 0x3f));\n// else if (x <= 0xffff)\n// output += String.fromCharCode(\n// 0xe0 | ((x >>> 12) & 0x0f),\n// 0x80 | ((x >>> 6) & 0x3f),\n// 0x80 | (x & 0x3f),\n// );\n// else if (x <= 0x1fffff)\n// output += String.fromCharCode(\n// 0xf0 | ((x >>> 18) & 0x07),\n// 0x80 | ((x >>> 12) & 0x3f),\n// 0x80 | ((x >>> 6) & 0x3f),\n// 0x80 | (x & 0x3f),\n// );\n// }\n// return output;\n// }\n// /*\n// * Encode a string as utf-16\n// */\n// function str2rstr_utf16le(input: string) {\n// var output = \"\";\n// for (var i = 0; i < input.length; i++)\n// output += String.fromCharCode(\n// input.charCodeAt(i) & 0xff,\n// (input.charCodeAt(i) >>> 8) & 0xff,\n// );\n// return output;\n// }\n// function str2rstr_utf16be(input: string) {\n// var output = \"\";\n// for (var i = 0; i < input.length; i++)\n// output += String.fromCharCode(\n// (input.charCodeAt(i) >>> 8) & 0xff,\n// input.charCodeAt(i) & 0xff,\n// );\n// return output;\n// }\n/*\n * Convert a raw string to an array of big-endian words\n * Characters >255 have their high-byte silently ignored.\n */\nfunction rstr2binb(input) {\n var output = Array(input.length >> 2);\n for (var i = 0; i < output.length; i++)\n output[i] = 0;\n for (var i = 0; i < input.length * 8; i += 8)\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (24 - (i % 32));\n return output;\n}\n/*\n * Convert an array of big-endian words to a string\n */\nfunction binb2rstr(input) {\n var output = \"\";\n for (var i = 0; i < input.length * 32; i += 8)\n output += String.fromCharCode((input[i >> 5] >>> (24 - (i % 32))) & 0xff);\n return output;\n}\n/*\n * Main sha256 function, with its support functions\n */\nfunction sha256_S(X, n) {\n return (X >>> n) | (X << (32 - n));\n}\nfunction sha256_R(X, n) {\n return X >>> n;\n}\nfunction sha256_Ch(x, y, z) {\n return (x & y) ^ (~x & z);\n}\nfunction sha256_Maj(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nfunction sha256_Sigma0256(x) {\n return sha256_S(x, 2) ^ sha256_S(x, 13) ^ sha256_S(x, 22);\n}\nfunction sha256_Sigma1256(x) {\n return sha256_S(x, 6) ^ sha256_S(x, 11) ^ sha256_S(x, 25);\n}\nfunction sha256_Gamma0256(x) {\n return sha256_S(x, 7) ^ sha256_S(x, 18) ^ sha256_R(x, 3);\n}\nfunction sha256_Gamma1256(x) {\n return sha256_S(x, 17) ^ sha256_S(x, 19) ^ sha256_R(x, 10);\n}\n// function sha256_Sigma0512(x: number) {\n// return sha256_S(x, 28) ^ sha256_S(x, 34) ^ sha256_S(x, 39);\n// }\n// function sha256_Sigma1512(x: number) {\n// return sha256_S(x, 14) ^ sha256_S(x, 18) ^ sha256_S(x, 41);\n// }\n// function sha256_Gamma0512(x: number) {\n// return sha256_S(x, 1) ^ sha256_S(x, 8) ^ sha256_R(x, 7);\n// }\n// function sha256_Gamma1512(x: number) {\n// return sha256_S(x, 19) ^ sha256_S(x, 61) ^ sha256_R(x, 6);\n// }\nvar sha256_K = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998);\nfunction binb_sha256(m, l) {\n var HASH = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225);\n var W = new Array(64);\n var a, b, c, d, e, f, g, h;\n var i, j, T1, T2;\n /* append padding */\n m[l >> 5] |= 0x80 << (24 - (l % 32));\n m[(((l + 64) >> 9) << 4) + 15] = l;\n for (i = 0; i < m.length; i += 16) {\n a = HASH[0];\n b = HASH[1];\n c = HASH[2];\n d = HASH[3];\n e = HASH[4];\n f = HASH[5];\n g = HASH[6];\n h = HASH[7];\n for (j = 0; j < 64; j++) {\n if (j < 16)\n W[j] = m[j + i];\n else\n W[j] = safe_add(safe_add(safe_add(sha256_Gamma1256(W[j - 2]), W[j - 7]), sha256_Gamma0256(W[j - 15])), W[j - 16]);\n T1 = safe_add(safe_add(safe_add(safe_add(h, sha256_Sigma1256(e)), sha256_Ch(e, f, g)), sha256_K[j]), W[j]);\n T2 = safe_add(sha256_Sigma0256(a), sha256_Maj(a, b, c));\n h = g;\n g = f;\n f = e;\n e = safe_add(d, T1);\n d = c;\n c = b;\n b = a;\n a = safe_add(T1, T2);\n }\n HASH[0] = safe_add(a, HASH[0]);\n HASH[1] = safe_add(b, HASH[1]);\n HASH[2] = safe_add(c, HASH[2]);\n HASH[3] = safe_add(d, HASH[3]);\n HASH[4] = safe_add(e, HASH[4]);\n HASH[5] = safe_add(f, HASH[5]);\n HASH[6] = safe_add(g, HASH[6]);\n HASH[7] = safe_add(h, HASH[7]);\n }\n return HASH;\n}\nfunction safe_add(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xffff);\n}\n"],"names":["rstr_sha256","s","binb2rstr","binb_sha256","rstr2binb","length","rstr2hex","input","hex_tab","output","i","x","charCodeAt","charAt","Array","String","fromCharCode","sha256_S","X","n","sha256_R","sha256_Ch","y","z","sha256_Maj","sha256_Sigma0256","sha256_Sigma1256","sha256_Gamma0256","sha256_Gamma1256","sha256_K","m","l","HASH","W","a","b","c","d","e","f","g","h","j","T1","T2","safe_add","lsw","msw"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,WAAWA,CAACC,CAAC,EAAE;AAC3B,EAAA,OAAOC,SAAS,CAACC,WAAW,CAACC,SAAS,CAACH,CAAC,CAAC,EAAEA,CAAC,CAACI,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,QAAQA,CAACC,KAAK,EAAE;EAC5B,IAAIC,OAAO,GAAG,kBAAkB;EAChC,IAAIC,MAAM,GAAG,EAAE;AACf,EAAA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,KAAK,CAACF,MAAM,EAAEK,CAAC,EAAE,EAAE;AACnC,IAAA,IAAIC,CAAC,GAAGJ,KAAK,CAACK,UAAU,CAACF,CAAC,CAAC;AAC3BD,IAAAA,MAAM,IAAID,OAAO,CAACK,MAAM,CAAEF,CAAC,KAAK,CAAC,GAAI,IAAI,CAAC,GAAGH,OAAO,CAACK,MAAM,CAACF,CAAC,GAAG,IAAI,CAAC;AACzE,EAAA;AACA,EAAA,OAAOF,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASL,SAASA,CAACG,KAAK,EAAE;EACtB,IAAIE,MAAM,GAAGK,KAAK,CAACP,KAAK,CAACF,MAAM,IAAI,CAAC,CAAC;AACrC,EAAA,KAAK,IAAIK,CAAC,GAAG,CAAC,EA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IAAI,CAAC,CAAC,CAAC,CAAC;AAClC,EAAA;AACA,EAAA,OAAOA,IAAI;AACf;AACA,SAASa,QAAQA,CAAClC,CAAC,EAAEW,CAAC,EAAE;EACpB,IAAIwB,GAAG,GAAG,CAACnC,CAAC,GAAG,MAAM,KAAKW,CAAC,GAAG,MAAM,CAAC;AACrC,EAAA,IAAIyB,GAAG,GAAG,CAACpC,CAAC,IAAI,EAAE,KAAKW,CAAC,IAAI,EAAE,CAAC,IAAIwB,GAAG,IAAI,EAAE,CAAC;AAC7C,EAAA,OAAQC,GAAG,IAAI,EAAE,GAAKD,GAAG,GAAG,MAAO;AACvC;;;;","x_google_ignoreList":[0]}
|
@@ -1,61 +0,0 @@
|
|
1
|
-
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
|
2
|
-
function int2char(n) {
|
3
|
-
return BI_RM.charAt(n);
|
4
|
-
}
|
5
|
-
//#region BIT_OPERATIONS
|
6
|
-
// (public) this & a
|
7
|
-
function op_and(x, y) {
|
8
|
-
return x & y;
|
9
|
-
}
|
10
|
-
// (public) this | a
|
11
|
-
function op_or(x, y) {
|
12
|
-
return x | y;
|
13
|
-
}
|
14
|
-
// (public) this ^ a
|
15
|
-
function op_xor(x, y) {
|
16
|
-
return x ^ y;
|
17
|
-
}
|
18
|
-
// (public) this & ~a
|
19
|
-
function op_andnot(x, y) {
|
20
|
-
return x & ~y;
|
21
|
-
}
|
22
|
-
// return index of lowest 1-bit in x, x < 2^31
|
23
|
-
function lbit(x) {
|
24
|
-
if (x == 0) {
|
25
|
-
return -1;
|
26
|
-
}
|
27
|
-
var r = 0;
|
28
|
-
if ((x & 0xffff) == 0) {
|
29
|
-
x >>= 16;
|
30
|
-
r += 16;
|
31
|
-
}
|
32
|
-
if ((x & 0xff) == 0) {
|
33
|
-
x >>= 8;
|
34
|
-
r += 8;
|
35
|
-
}
|
36
|
-
if ((x & 0xf) == 0) {
|
37
|
-
x >>= 4;
|
38
|
-
r += 4;
|
39
|
-
}
|
40
|
-
if ((x & 3) == 0) {
|
41
|
-
x >>= 2;
|
42
|
-
r += 2;
|
43
|
-
}
|
44
|
-
if ((x & 1) == 0) {
|
45
|
-
++r;
|
46
|
-
}
|
47
|
-
return r;
|
48
|
-
}
|
49
|
-
// return number of 1 bits in x
|
50
|
-
function cbit(x) {
|
51
|
-
var r = 0;
|
52
|
-
while (x != 0) {
|
53
|
-
x &= x - 1;
|
54
|
-
++r;
|
55
|
-
}
|
56
|
-
return r;
|
57
|
-
}
|
58
|
-
//#endregion BIT_OPERATIONS
|
59
|
-
|
60
|
-
export { cbit, int2char, lbit, op_and, op_andnot, op_or, op_xor };
|
61
|
-
//# sourceMappingURL=util.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"util.js","sources":["../../../../../../node_modules/jsencrypt/lib/lib/jsbn/util.js"],"sourcesContent":["var BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\nexport function int2char(n) {\n return BI_RM.charAt(n);\n}\n//#region BIT_OPERATIONS\n// (public) this & a\nexport function op_and(x, y) {\n return x & y;\n}\n// (public) this | a\nexport function op_or(x, y) {\n return x | y;\n}\n// (public) this ^ a\nexport function op_xor(x, y) {\n return x ^ y;\n}\n// (public) this & ~a\nexport function op_andnot(x, y) {\n return x & ~y;\n}\n// return index of lowest 1-bit in x, x < 2^31\nexport function lbit(x) {\n if (x == 0) {\n return -1;\n }\n var r = 0;\n if ((x & 0xffff) == 0) {\n x >>= 16;\n r += 16;\n }\n if ((x & 0xff) == 0) {\n x >>= 8;\n r += 8;\n }\n if ((x & 0xf) == 0) {\n x >>= 4;\n r += 4;\n }\n if ((x & 3) == 0) {\n x >>= 2;\n r += 2;\n }\n if ((x & 1) == 0) {\n ++r;\n }\n return r;\n}\n// return number of 1 bits in x\nexport function cbit(x) {\n var r = 0;\n while (x != 0) {\n x &= x - 1;\n ++r;\n }\n return r;\n}\n//#endregion BIT_OPERATIONS\n"],"names":["BI_RM","int2char","n","charAt","op_and","x","y","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