@solar-taro/ui-sun 2.0.0 → 2.2.0
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/CHANGELOG.md +33 -0
- package/index.d.ts +2 -0
- package/index.js +29 -25
- package/index13.js +1 -1
- package/index14.js +1 -1
- package/index23.js +1 -1
- package/index24.js +1 -1
- package/index25.js +9 -9
- package/index26.js +10 -2
- package/index27.js +10 -2
- package/index28.js +1 -1
- package/index29.js +2 -7
- package/index30.js +1 -1
- package/index31.js +1 -1
- package/index32.js +1 -1
- package/index33.js +7 -2
- package/index34.js +1 -1
- package/index35.js +1 -1
- package/index36.js +1 -1
- package/index37.js +1 -1
- package/index38.js +1 -1
- package/index39.js +1 -1
- package/index40.js +1 -1
- package/index41.js +1 -1
- package/index42.js +1 -1
- package/index43.js +1 -1
- package/index44.js +1 -1
- package/index45.js +1 -1
- package/index46.js +1 -1
- package/index47.js +2 -3
- package/index48.js +7 -7
- package/index49.js +3 -3
- package/index50.js +4 -4
- package/index51.js +4 -4
- package/index54.js +3 -26
- package/index55.js +2 -2
- package/index56.js +24 -504
- package/index57.js +2 -79
- package/index58.js +498 -62
- package/index59.js +58 -48
- package/index60.js +62 -535
- package/index61.js +69 -2
- package/index62.js +543 -2
- package/index63.js +2 -2
- package/index64.js +2 -4
- package/index65.js +2 -2
- package/index66.js +4 -4
- package/index68.js +4 -2
- package/index71.js +2 -48
- package/index72.js +41 -75
- package/index73.js +82 -2
- package/index74.js +2 -2
- package/index75.js +2 -2
- package/index76.js +4 -0
- package/index77.js +4 -0
- package/package.json +1 -1
- package/page-header/index.d.ts +1 -0
- package/page-header/index.scss +5 -0
- package/page-header/index.vue.d.ts +17 -0
- package/popover/index.scss +20 -18
- package/title/index.d.ts +1 -0
- package/title/index.scss +4 -0
- package/title/index.vue.d.ts +17 -0
package/index62.js
CHANGED
|
@@ -1,4 +1,545 @@
|
|
|
1
|
-
|
|
1
|
+
import { commonjsGlobal as X } from "./index56.js";
|
|
2
|
+
import { __module as m } from "./index74.js";
|
|
3
|
+
import { __require as A } from "./index58.js";
|
|
4
|
+
import { __require as W } from "./index61.js";
|
|
5
|
+
var B;
|
|
6
|
+
function j() {
|
|
7
|
+
return B ? m.exports : (B = 1, function(S, L) {
|
|
8
|
+
(function(u, v, c) {
|
|
9
|
+
S.exports = v(A(), W());
|
|
10
|
+
})(X, function(u) {
|
|
11
|
+
u.lib.Cipher || function(v) {
|
|
12
|
+
var c = u, s = c.lib, p = s.Base, h = s.WordArray, y = s.BufferedBlockAlgorithm, x = c.enc;
|
|
13
|
+
x.Utf8;
|
|
14
|
+
var C = x.Base64, g = c.algo, k = g.EvpKDF, f = s.Cipher = y.extend({
|
|
15
|
+
/**
|
|
16
|
+
* Configuration options.
|
|
17
|
+
*
|
|
18
|
+
* @property {WordArray} iv The IV to use for this operation.
|
|
19
|
+
*/
|
|
20
|
+
cfg: p.extend(),
|
|
21
|
+
/**
|
|
22
|
+
* Creates this cipher in encryption mode.
|
|
23
|
+
*
|
|
24
|
+
* @param {WordArray} key The key.
|
|
25
|
+
* @param {Object} cfg (Optional) The configuration options to use for this operation.
|
|
26
|
+
*
|
|
27
|
+
* @return {Cipher} A cipher instance.
|
|
28
|
+
*
|
|
29
|
+
* @static
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
*
|
|
33
|
+
* var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
|
|
34
|
+
*/
|
|
35
|
+
createEncryptor: function(e, t) {
|
|
36
|
+
return this.create(this._ENC_XFORM_MODE, e, t);
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Creates this cipher in decryption mode.
|
|
40
|
+
*
|
|
41
|
+
* @param {WordArray} key The key.
|
|
42
|
+
* @param {Object} cfg (Optional) The configuration options to use for this operation.
|
|
43
|
+
*
|
|
44
|
+
* @return {Cipher} A cipher instance.
|
|
45
|
+
*
|
|
46
|
+
* @static
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
*
|
|
50
|
+
* var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
|
|
51
|
+
*/
|
|
52
|
+
createDecryptor: function(e, t) {
|
|
53
|
+
return this.create(this._DEC_XFORM_MODE, e, t);
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Initializes a newly created cipher.
|
|
57
|
+
*
|
|
58
|
+
* @param {number} xformMode Either the encryption or decryption transormation mode constant.
|
|
59
|
+
* @param {WordArray} key The key.
|
|
60
|
+
* @param {Object} cfg (Optional) The configuration options to use for this operation.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
*
|
|
64
|
+
* var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
|
|
65
|
+
*/
|
|
66
|
+
init: function(e, t, i) {
|
|
67
|
+
this.cfg = this.cfg.extend(i), this._xformMode = e, this._key = t, this.reset();
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* Resets this cipher to its initial state.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
*
|
|
74
|
+
* cipher.reset();
|
|
75
|
+
*/
|
|
76
|
+
reset: function() {
|
|
77
|
+
y.reset.call(this), this._doReset();
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* Adds data to be encrypted or decrypted.
|
|
81
|
+
*
|
|
82
|
+
* @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
|
|
83
|
+
*
|
|
84
|
+
* @return {WordArray} The data after processing.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
*
|
|
88
|
+
* var encrypted = cipher.process('data');
|
|
89
|
+
* var encrypted = cipher.process(wordArray);
|
|
90
|
+
*/
|
|
91
|
+
process: function(e) {
|
|
92
|
+
return this._append(e), this._process();
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* Finalizes the encryption or decryption process.
|
|
96
|
+
* Note that the finalize operation is effectively a destructive, read-once operation.
|
|
97
|
+
*
|
|
98
|
+
* @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
|
|
99
|
+
*
|
|
100
|
+
* @return {WordArray} The data after final processing.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
*
|
|
104
|
+
* var encrypted = cipher.finalize();
|
|
105
|
+
* var encrypted = cipher.finalize('data');
|
|
106
|
+
* var encrypted = cipher.finalize(wordArray);
|
|
107
|
+
*/
|
|
108
|
+
finalize: function(e) {
|
|
109
|
+
e && this._append(e);
|
|
110
|
+
var t = this._doFinalize();
|
|
111
|
+
return t;
|
|
112
|
+
},
|
|
113
|
+
keySize: 128 / 32,
|
|
114
|
+
ivSize: 128 / 32,
|
|
115
|
+
_ENC_XFORM_MODE: 1,
|
|
116
|
+
_DEC_XFORM_MODE: 2,
|
|
117
|
+
/**
|
|
118
|
+
* Creates shortcut functions to a cipher's object interface.
|
|
119
|
+
*
|
|
120
|
+
* @param {Cipher} cipher The cipher to create a helper for.
|
|
121
|
+
*
|
|
122
|
+
* @return {Object} An object with encrypt and decrypt shortcut functions.
|
|
123
|
+
*
|
|
124
|
+
* @static
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
*
|
|
128
|
+
* var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
|
|
129
|
+
*/
|
|
130
|
+
_createHelper: /* @__PURE__ */ function() {
|
|
131
|
+
function e(t) {
|
|
132
|
+
return typeof t == "string" ? q : l;
|
|
133
|
+
}
|
|
134
|
+
return function(t) {
|
|
135
|
+
return {
|
|
136
|
+
encrypt: function(i, r, n) {
|
|
137
|
+
return e(r).encrypt(t, i, r, n);
|
|
138
|
+
},
|
|
139
|
+
decrypt: function(i, r, n) {
|
|
140
|
+
return e(r).decrypt(t, i, r, n);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
}()
|
|
145
|
+
});
|
|
146
|
+
s.StreamCipher = f.extend({
|
|
147
|
+
_doFinalize: function() {
|
|
148
|
+
var e = this._process(!0);
|
|
149
|
+
return e;
|
|
150
|
+
},
|
|
151
|
+
blockSize: 1
|
|
152
|
+
});
|
|
153
|
+
var z = c.mode = {}, E = s.BlockCipherMode = p.extend({
|
|
154
|
+
/**
|
|
155
|
+
* Creates this mode for encryption.
|
|
156
|
+
*
|
|
157
|
+
* @param {Cipher} cipher A block cipher instance.
|
|
158
|
+
* @param {Array} iv The IV words.
|
|
159
|
+
*
|
|
160
|
+
* @static
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
*
|
|
164
|
+
* var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
|
|
165
|
+
*/
|
|
166
|
+
createEncryptor: function(e, t) {
|
|
167
|
+
return this.Encryptor.create(e, t);
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* Creates this mode for decryption.
|
|
171
|
+
*
|
|
172
|
+
* @param {Cipher} cipher A block cipher instance.
|
|
173
|
+
* @param {Array} iv The IV words.
|
|
174
|
+
*
|
|
175
|
+
* @static
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
*
|
|
179
|
+
* var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
|
|
180
|
+
*/
|
|
181
|
+
createDecryptor: function(e, t) {
|
|
182
|
+
return this.Decryptor.create(e, t);
|
|
183
|
+
},
|
|
184
|
+
/**
|
|
185
|
+
* Initializes a newly created mode.
|
|
186
|
+
*
|
|
187
|
+
* @param {Cipher} cipher A block cipher instance.
|
|
188
|
+
* @param {Array} iv The IV words.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
*
|
|
192
|
+
* var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
|
|
193
|
+
*/
|
|
194
|
+
init: function(e, t) {
|
|
195
|
+
this._cipher = e, this._iv = t;
|
|
196
|
+
}
|
|
197
|
+
}), b = z.CBC = function() {
|
|
198
|
+
var e = E.extend();
|
|
199
|
+
e.Encryptor = e.extend({
|
|
200
|
+
/**
|
|
201
|
+
* Processes the data block at offset.
|
|
202
|
+
*
|
|
203
|
+
* @param {Array} words The data words to operate on.
|
|
204
|
+
* @param {number} offset The offset where the block starts.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
*
|
|
208
|
+
* mode.processBlock(data.words, offset);
|
|
209
|
+
*/
|
|
210
|
+
processBlock: function(i, r) {
|
|
211
|
+
var n = this._cipher, a = n.blockSize;
|
|
212
|
+
t.call(this, i, r, a), n.encryptBlock(i, r), this._prevBlock = i.slice(r, r + a);
|
|
213
|
+
}
|
|
214
|
+
}), e.Decryptor = e.extend({
|
|
215
|
+
/**
|
|
216
|
+
* Processes the data block at offset.
|
|
217
|
+
*
|
|
218
|
+
* @param {Array} words The data words to operate on.
|
|
219
|
+
* @param {number} offset The offset where the block starts.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
*
|
|
223
|
+
* mode.processBlock(data.words, offset);
|
|
224
|
+
*/
|
|
225
|
+
processBlock: function(i, r) {
|
|
226
|
+
var n = this._cipher, a = n.blockSize, o = i.slice(r, r + a);
|
|
227
|
+
n.decryptBlock(i, r), t.call(this, i, r, a), this._prevBlock = o;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
function t(i, r, n) {
|
|
231
|
+
var a, o = this._iv;
|
|
232
|
+
o ? (a = o, this._iv = v) : a = this._prevBlock;
|
|
233
|
+
for (var d = 0; d < n; d++)
|
|
234
|
+
i[r + d] ^= a[d];
|
|
235
|
+
}
|
|
236
|
+
return e;
|
|
237
|
+
}(), D = c.pad = {}, M = D.Pkcs7 = {
|
|
238
|
+
/**
|
|
239
|
+
* Pads data using the algorithm defined in PKCS #5/7.
|
|
240
|
+
*
|
|
241
|
+
* @param {WordArray} data The data to pad.
|
|
242
|
+
* @param {number} blockSize The multiple that the data should be padded to.
|
|
243
|
+
*
|
|
244
|
+
* @static
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
*
|
|
248
|
+
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
249
|
+
*/
|
|
250
|
+
pad: function(e, t) {
|
|
251
|
+
for (var i = t * 4, r = i - e.sigBytes % i, n = r << 24 | r << 16 | r << 8 | r, a = [], o = 0; o < r; o += 4)
|
|
252
|
+
a.push(n);
|
|
253
|
+
var d = h.create(a, r);
|
|
254
|
+
e.concat(d);
|
|
255
|
+
},
|
|
256
|
+
/**
|
|
257
|
+
* Unpads data that had been padded using the algorithm defined in PKCS #5/7.
|
|
258
|
+
*
|
|
259
|
+
* @param {WordArray} data The data to unpad.
|
|
260
|
+
*
|
|
261
|
+
* @static
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
*
|
|
265
|
+
* CryptoJS.pad.Pkcs7.unpad(wordArray);
|
|
266
|
+
*/
|
|
267
|
+
unpad: function(e) {
|
|
268
|
+
var t = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
269
|
+
e.sigBytes -= t;
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
s.BlockCipher = f.extend({
|
|
273
|
+
/**
|
|
274
|
+
* Configuration options.
|
|
275
|
+
*
|
|
276
|
+
* @property {Mode} mode The block mode to use. Default: CBC
|
|
277
|
+
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
278
|
+
*/
|
|
279
|
+
cfg: f.cfg.extend({
|
|
280
|
+
mode: b,
|
|
281
|
+
padding: M
|
|
282
|
+
}),
|
|
283
|
+
reset: function() {
|
|
284
|
+
var e;
|
|
285
|
+
f.reset.call(this);
|
|
286
|
+
var t = this.cfg, i = t.iv, r = t.mode;
|
|
287
|
+
this._xformMode == this._ENC_XFORM_MODE ? e = r.createEncryptor : (e = r.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == e ? this._mode.init(this, i && i.words) : (this._mode = e.call(r, this, i && i.words), this._mode.__creator = e);
|
|
288
|
+
},
|
|
289
|
+
_doProcessBlock: function(e, t) {
|
|
290
|
+
this._mode.processBlock(e, t);
|
|
291
|
+
},
|
|
292
|
+
_doFinalize: function() {
|
|
293
|
+
var e, t = this.cfg.padding;
|
|
294
|
+
return this._xformMode == this._ENC_XFORM_MODE ? (t.pad(this._data, this.blockSize), e = this._process(!0)) : (e = this._process(!0), t.unpad(e)), e;
|
|
295
|
+
},
|
|
296
|
+
blockSize: 128 / 32
|
|
297
|
+
});
|
|
298
|
+
var _ = s.CipherParams = p.extend({
|
|
299
|
+
/**
|
|
300
|
+
* Initializes a newly created cipher params object.
|
|
301
|
+
*
|
|
302
|
+
* @param {Object} cipherParams An object with any of the possible cipher parameters.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
*
|
|
306
|
+
* var cipherParams = CryptoJS.lib.CipherParams.create({
|
|
307
|
+
* ciphertext: ciphertextWordArray,
|
|
308
|
+
* key: keyWordArray,
|
|
309
|
+
* iv: ivWordArray,
|
|
310
|
+
* salt: saltWordArray,
|
|
311
|
+
* algorithm: CryptoJS.algo.AES,
|
|
312
|
+
* mode: CryptoJS.mode.CBC,
|
|
313
|
+
* padding: CryptoJS.pad.PKCS7,
|
|
314
|
+
* blockSize: 4,
|
|
315
|
+
* formatter: CryptoJS.format.OpenSSL
|
|
316
|
+
* });
|
|
317
|
+
*/
|
|
318
|
+
init: function(e) {
|
|
319
|
+
this.mixIn(e);
|
|
320
|
+
},
|
|
321
|
+
/**
|
|
322
|
+
* Converts this cipher params object to a string.
|
|
323
|
+
*
|
|
324
|
+
* @param {Format} formatter (Optional) The formatting strategy to use.
|
|
325
|
+
*
|
|
326
|
+
* @return {string} The stringified cipher params.
|
|
327
|
+
*
|
|
328
|
+
* @throws Error If neither the formatter nor the default formatter is set.
|
|
329
|
+
*
|
|
330
|
+
* @example
|
|
331
|
+
*
|
|
332
|
+
* var string = cipherParams + '';
|
|
333
|
+
* var string = cipherParams.toString();
|
|
334
|
+
* var string = cipherParams.toString(CryptoJS.format.OpenSSL);
|
|
335
|
+
*/
|
|
336
|
+
toString: function(e) {
|
|
337
|
+
return (e || this.formatter).stringify(this);
|
|
338
|
+
}
|
|
339
|
+
}), O = c.format = {}, P = O.OpenSSL = {
|
|
340
|
+
/**
|
|
341
|
+
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
342
|
+
*
|
|
343
|
+
* @param {CipherParams} cipherParams The cipher params object.
|
|
344
|
+
*
|
|
345
|
+
* @return {string} The OpenSSL-compatible string.
|
|
346
|
+
*
|
|
347
|
+
* @static
|
|
348
|
+
*
|
|
349
|
+
* @example
|
|
350
|
+
*
|
|
351
|
+
* var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
|
|
352
|
+
*/
|
|
353
|
+
stringify: function(e) {
|
|
354
|
+
var t, i = e.ciphertext, r = e.salt;
|
|
355
|
+
return r ? t = h.create([1398893684, 1701076831]).concat(r).concat(i) : t = i, t.toString(C);
|
|
356
|
+
},
|
|
357
|
+
/**
|
|
358
|
+
* Converts an OpenSSL-compatible string to a cipher params object.
|
|
359
|
+
*
|
|
360
|
+
* @param {string} openSSLStr The OpenSSL-compatible string.
|
|
361
|
+
*
|
|
362
|
+
* @return {CipherParams} The cipher params object.
|
|
363
|
+
*
|
|
364
|
+
* @static
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
*
|
|
368
|
+
* var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
|
|
369
|
+
*/
|
|
370
|
+
parse: function(e) {
|
|
371
|
+
var t, i = C.parse(e), r = i.words;
|
|
372
|
+
return r[0] == 1398893684 && r[1] == 1701076831 && (t = h.create(r.slice(2, 4)), r.splice(0, 4), i.sigBytes -= 16), _.create({ ciphertext: i, salt: t });
|
|
373
|
+
}
|
|
374
|
+
}, l = s.SerializableCipher = p.extend({
|
|
375
|
+
/**
|
|
376
|
+
* Configuration options.
|
|
377
|
+
*
|
|
378
|
+
* @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
|
|
379
|
+
*/
|
|
380
|
+
cfg: p.extend({
|
|
381
|
+
format: P
|
|
382
|
+
}),
|
|
383
|
+
/**
|
|
384
|
+
* Encrypts a message.
|
|
385
|
+
*
|
|
386
|
+
* @param {Cipher} cipher The cipher algorithm to use.
|
|
387
|
+
* @param {WordArray|string} message The message to encrypt.
|
|
388
|
+
* @param {WordArray} key The key.
|
|
389
|
+
* @param {Object} cfg (Optional) The configuration options to use for this operation.
|
|
390
|
+
*
|
|
391
|
+
* @return {CipherParams} A cipher params object.
|
|
392
|
+
*
|
|
393
|
+
* @static
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
*
|
|
397
|
+
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
|
|
398
|
+
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
|
|
399
|
+
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
400
|
+
*/
|
|
401
|
+
encrypt: function(e, t, i, r) {
|
|
402
|
+
r = this.cfg.extend(r);
|
|
403
|
+
var n = e.createEncryptor(i, r), a = n.finalize(t), o = n.cfg;
|
|
404
|
+
return _.create({
|
|
405
|
+
ciphertext: a,
|
|
406
|
+
key: i,
|
|
407
|
+
iv: o.iv,
|
|
408
|
+
algorithm: e,
|
|
409
|
+
mode: o.mode,
|
|
410
|
+
padding: o.padding,
|
|
411
|
+
blockSize: e.blockSize,
|
|
412
|
+
formatter: r.format
|
|
413
|
+
});
|
|
414
|
+
},
|
|
415
|
+
/**
|
|
416
|
+
* Decrypts serialized ciphertext.
|
|
417
|
+
*
|
|
418
|
+
* @param {Cipher} cipher The cipher algorithm to use.
|
|
419
|
+
* @param {CipherParams|string} ciphertext The ciphertext to decrypt.
|
|
420
|
+
* @param {WordArray} key The key.
|
|
421
|
+
* @param {Object} cfg (Optional) The configuration options to use for this operation.
|
|
422
|
+
*
|
|
423
|
+
* @return {WordArray} The plaintext.
|
|
424
|
+
*
|
|
425
|
+
* @static
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
*
|
|
429
|
+
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
430
|
+
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
431
|
+
*/
|
|
432
|
+
decrypt: function(e, t, i, r) {
|
|
433
|
+
r = this.cfg.extend(r), t = this._parse(t, r.format);
|
|
434
|
+
var n = e.createDecryptor(i, r).finalize(t.ciphertext);
|
|
435
|
+
return n;
|
|
436
|
+
},
|
|
437
|
+
/**
|
|
438
|
+
* Converts serialized ciphertext to CipherParams,
|
|
439
|
+
* else assumed CipherParams already and returns ciphertext unchanged.
|
|
440
|
+
*
|
|
441
|
+
* @param {CipherParams|string} ciphertext The ciphertext.
|
|
442
|
+
* @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
|
|
443
|
+
*
|
|
444
|
+
* @return {CipherParams} The unserialized ciphertext.
|
|
445
|
+
*
|
|
446
|
+
* @static
|
|
447
|
+
*
|
|
448
|
+
* @example
|
|
449
|
+
*
|
|
450
|
+
* var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
|
|
451
|
+
*/
|
|
452
|
+
_parse: function(e, t) {
|
|
453
|
+
return typeof e == "string" ? t.parse(e, this) : e;
|
|
454
|
+
}
|
|
455
|
+
}), F = c.kdf = {}, R = F.OpenSSL = {
|
|
456
|
+
/**
|
|
457
|
+
* Derives a key and IV from a password.
|
|
458
|
+
*
|
|
459
|
+
* @param {string} password The password to derive from.
|
|
460
|
+
* @param {number} keySize The size in words of the key to generate.
|
|
461
|
+
* @param {number} ivSize The size in words of the IV to generate.
|
|
462
|
+
* @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
|
|
463
|
+
*
|
|
464
|
+
* @return {CipherParams} A cipher params object with the key, IV, and salt.
|
|
465
|
+
*
|
|
466
|
+
* @static
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
*
|
|
470
|
+
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
471
|
+
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
472
|
+
*/
|
|
473
|
+
execute: function(e, t, i, r, n) {
|
|
474
|
+
if (r || (r = h.random(64 / 8)), n)
|
|
475
|
+
var a = k.create({ keySize: t + i, hasher: n }).compute(e, r);
|
|
476
|
+
else
|
|
477
|
+
var a = k.create({ keySize: t + i }).compute(e, r);
|
|
478
|
+
var o = h.create(a.words.slice(t), i * 4);
|
|
479
|
+
return a.sigBytes = t * 4, _.create({ key: a, iv: o, salt: r });
|
|
480
|
+
}
|
|
481
|
+
}, q = s.PasswordBasedCipher = l.extend({
|
|
482
|
+
/**
|
|
483
|
+
* Configuration options.
|
|
484
|
+
*
|
|
485
|
+
* @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
|
|
486
|
+
*/
|
|
487
|
+
cfg: l.cfg.extend({
|
|
488
|
+
kdf: R
|
|
489
|
+
}),
|
|
490
|
+
/**
|
|
491
|
+
* Encrypts a message using a password.
|
|
492
|
+
*
|
|
493
|
+
* @param {Cipher} cipher The cipher algorithm to use.
|
|
494
|
+
* @param {WordArray|string} message The message to encrypt.
|
|
495
|
+
* @param {string} password The password.
|
|
496
|
+
* @param {Object} cfg (Optional) The configuration options to use for this operation.
|
|
497
|
+
*
|
|
498
|
+
* @return {CipherParams} A cipher params object.
|
|
499
|
+
*
|
|
500
|
+
* @static
|
|
501
|
+
*
|
|
502
|
+
* @example
|
|
503
|
+
*
|
|
504
|
+
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
|
|
505
|
+
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
|
|
506
|
+
*/
|
|
507
|
+
encrypt: function(e, t, i, r) {
|
|
508
|
+
r = this.cfg.extend(r);
|
|
509
|
+
var n = r.kdf.execute(i, e.keySize, e.ivSize, r.salt, r.hasher);
|
|
510
|
+
r.iv = n.iv;
|
|
511
|
+
var a = l.encrypt.call(this, e, t, n.key, r);
|
|
512
|
+
return a.mixIn(n), a;
|
|
513
|
+
},
|
|
514
|
+
/**
|
|
515
|
+
* Decrypts serialized ciphertext using a password.
|
|
516
|
+
*
|
|
517
|
+
* @param {Cipher} cipher The cipher algorithm to use.
|
|
518
|
+
* @param {CipherParams|string} ciphertext The ciphertext to decrypt.
|
|
519
|
+
* @param {string} password The password.
|
|
520
|
+
* @param {Object} cfg (Optional) The configuration options to use for this operation.
|
|
521
|
+
*
|
|
522
|
+
* @return {WordArray} The plaintext.
|
|
523
|
+
*
|
|
524
|
+
* @static
|
|
525
|
+
*
|
|
526
|
+
* @example
|
|
527
|
+
*
|
|
528
|
+
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
|
|
529
|
+
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
|
|
530
|
+
*/
|
|
531
|
+
decrypt: function(e, t, i, r) {
|
|
532
|
+
r = this.cfg.extend(r), t = this._parse(t, r.format);
|
|
533
|
+
var n = r.kdf.execute(i, e.keySize, e.ivSize, t.salt, r.hasher);
|
|
534
|
+
r.iv = n.iv;
|
|
535
|
+
var a = l.decrypt.call(this, e, t, n.key, r);
|
|
536
|
+
return a;
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}();
|
|
540
|
+
});
|
|
541
|
+
}(m), m.exports);
|
|
542
|
+
}
|
|
2
543
|
export {
|
|
3
|
-
|
|
544
|
+
j as __require
|
|
4
545
|
};
|
package/index63.js
CHANGED
package/index64.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
3
|
-
}
|
|
1
|
+
var e = { exports: {} };
|
|
4
2
|
export {
|
|
5
|
-
|
|
3
|
+
e as __module
|
|
6
4
|
};
|
package/index65.js
CHANGED
package/index66.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
function r(o) {
|
|
2
|
+
throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
3
|
+
}
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
r as commonjsRequire
|
|
6
6
|
};
|
package/index68.js
CHANGED
package/index71.js
CHANGED
|
@@ -1,50 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { __module as d } from "./index74.js";
|
|
3
|
-
import { __require as S } from "./index56.js";
|
|
4
|
-
var m;
|
|
5
|
-
function w() {
|
|
6
|
-
return m ? d.exports : (m = 1, function(p, g) {
|
|
7
|
-
(function(v, c) {
|
|
8
|
-
p.exports = c(S());
|
|
9
|
-
})(B, function(v) {
|
|
10
|
-
return function() {
|
|
11
|
-
var c = v, u = c.lib, b = u.WordArray, f = u.Hasher, A = c.algo, i = [], x = A.SHA1 = f.extend({
|
|
12
|
-
_doReset: function() {
|
|
13
|
-
this._hash = new b.init([
|
|
14
|
-
1732584193,
|
|
15
|
-
4023233417,
|
|
16
|
-
2562383102,
|
|
17
|
-
271733878,
|
|
18
|
-
3285377520
|
|
19
|
-
]);
|
|
20
|
-
},
|
|
21
|
-
_doProcessBlock: function(s, h) {
|
|
22
|
-
for (var r = this._hash.words, a = r[0], o = r[1], t = r[2], n = r[3], _ = r[4], e = 0; e < 80; e++) {
|
|
23
|
-
if (e < 16)
|
|
24
|
-
i[e] = s[h + e] | 0;
|
|
25
|
-
else {
|
|
26
|
-
var H = i[e - 3] ^ i[e - 8] ^ i[e - 14] ^ i[e - 16];
|
|
27
|
-
i[e] = H << 1 | H >>> 31;
|
|
28
|
-
}
|
|
29
|
-
var l = (a << 5 | a >>> 27) + _ + i[e];
|
|
30
|
-
e < 20 ? l += (o & t | ~o & n) + 1518500249 : e < 40 ? l += (o ^ t ^ n) + 1859775393 : e < 60 ? l += (o & t | o & n | t & n) - 1894007588 : l += (o ^ t ^ n) - 899497514, _ = n, n = t, t = o << 30 | o >>> 2, o = a, a = l;
|
|
31
|
-
}
|
|
32
|
-
r[0] = r[0] + a | 0, r[1] = r[1] + o | 0, r[2] = r[2] + t | 0, r[3] = r[3] + n | 0, r[4] = r[4] + _ | 0;
|
|
33
|
-
},
|
|
34
|
-
_doFinalize: function() {
|
|
35
|
-
var s = this._data, h = s.words, r = this._nDataBytes * 8, a = s.sigBytes * 8;
|
|
36
|
-
return h[a >>> 5] |= 128 << 24 - a % 32, h[(a + 64 >>> 9 << 4) + 14] = Math.floor(r / 4294967296), h[(a + 64 >>> 9 << 4) + 15] = r, s.sigBytes = h.length * 4, this._process(), this._hash;
|
|
37
|
-
},
|
|
38
|
-
clone: function() {
|
|
39
|
-
var s = f.clone.call(this);
|
|
40
|
-
return s._hash = this._hash.clone(), s;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
c.SHA1 = f._createHelper(x), c.HmacSHA1 = f._createHmacHelper(x);
|
|
44
|
-
}(), v.SHA1;
|
|
45
|
-
});
|
|
46
|
-
}(d), d.exports);
|
|
47
|
-
}
|
|
1
|
+
var e = { exports: {} };
|
|
48
2
|
export {
|
|
49
|
-
|
|
3
|
+
e as __module
|
|
50
4
|
};
|