google-closure-compiler 20250412.0.0-nightly → 20250413.0.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.
Files changed (131) hide show
  1. package/README.md +5 -30
  2. package/cli.js +3 -4
  3. package/externs/browser/decorators.js +276 -0
  4. package/externs/browser/deprecated.js +58 -0
  5. package/externs/browser/es6_proxy.js +143 -0
  6. package/externs/browser/fetchapi.js +449 -0
  7. package/externs/browser/fido.js +94 -0
  8. package/externs/browser/flash.js +226 -0
  9. package/externs/browser/gecko_css.js +126 -0
  10. package/externs/browser/gecko_dom.js +479 -0
  11. package/externs/browser/gecko_event.js +86 -0
  12. package/externs/browser/gecko_xml.js +73 -0
  13. package/externs/browser/google_legacy.js +31 -0
  14. package/externs/browser/html5.js +6647 -0
  15. package/externs/browser/ie_css.js +270 -0
  16. package/externs/browser/ie_dom.js +1232 -0
  17. package/externs/browser/ie_event.js +310 -0
  18. package/externs/browser/ie_vml.js +77 -0
  19. package/externs/browser/intersection_observer.js +178 -0
  20. package/externs/browser/intl.js +602 -0
  21. package/externs/browser/iphone.js +204 -0
  22. package/externs/browser/mediakeys.js +305 -0
  23. package/externs/browser/mediasource.js +155 -0
  24. package/externs/browser/nonstandard_anim_timing.js +97 -0
  25. package/externs/browser/nonstandard_audio.js +82 -0
  26. package/externs/browser/nonstandard_console.js +75 -0
  27. package/externs/browser/nonstandard_fileapi.js +1066 -0
  28. package/externs/browser/nonstandard_indexeddb.js +78 -0
  29. package/externs/browser/nonstandard_navigation_timing.js +38 -0
  30. package/externs/browser/nonstandard_selection.js +80 -0
  31. package/externs/browser/page_visibility.js +28 -0
  32. package/externs/browser/streamsapi.js +593 -0
  33. package/externs/browser/svg.js +10016 -0
  34. package/externs/browser/url.js +202 -0
  35. package/externs/browser/v8.js +134 -0
  36. package/externs/browser/w3c_abort.js +89 -0
  37. package/externs/browser/w3c_anim_timing.js +49 -0
  38. package/externs/browser/w3c_aria_mixin.js +286 -0
  39. package/externs/browser/w3c_audio.js +1660 -0
  40. package/externs/browser/w3c_batterystatus.js +85 -0
  41. package/externs/browser/w3c_clipboard.js +74 -0
  42. package/externs/browser/w3c_clipboardevent.js +47 -0
  43. package/externs/browser/w3c_composition_event.js +93 -0
  44. package/externs/browser/w3c_css.js +3790 -0
  45. package/externs/browser/w3c_css3d.js +199 -0
  46. package/externs/browser/w3c_device_sensor_event.js +122 -0
  47. package/externs/browser/w3c_dom1.js +1160 -0
  48. package/externs/browser/w3c_dom2.js +3151 -0
  49. package/externs/browser/w3c_dom3.js +555 -0
  50. package/externs/browser/w3c_dom4.js +289 -0
  51. package/externs/browser/w3c_elementtraversal.js +116 -0
  52. package/externs/browser/w3c_event.js +607 -0
  53. package/externs/browser/w3c_event3.js +77 -0
  54. package/externs/browser/w3c_eventsource.js +110 -0
  55. package/externs/browser/w3c_fileapi.js +302 -0
  56. package/externs/browser/w3c_gamepad.js +113 -0
  57. package/externs/browser/w3c_geolocation.js +130 -0
  58. package/externs/browser/w3c_geometry1.js +899 -0
  59. package/externs/browser/w3c_indexeddb.js +771 -0
  60. package/externs/browser/w3c_keyboardlock.js +47 -0
  61. package/externs/browser/w3c_mediacapabilities.js +206 -0
  62. package/externs/browser/w3c_midi.js +301 -0
  63. package/externs/browser/w3c_navigation.js +72 -0
  64. package/externs/browser/w3c_navigation_timing.js +437 -0
  65. package/externs/browser/w3c_netinfo.js +85 -0
  66. package/externs/browser/w3c_payment_request.js +401 -0
  67. package/externs/browser/w3c_permissions.js +112 -0
  68. package/externs/browser/w3c_permissions_policy.js +78 -0
  69. package/externs/browser/w3c_pointer_events.js +163 -0
  70. package/externs/browser/w3c_pointerlock.js +63 -0
  71. package/externs/browser/w3c_range.js +284 -0
  72. package/externs/browser/w3c_referrer_policy.js +36 -0
  73. package/externs/browser/w3c_requestidlecallback.js +76 -0
  74. package/externs/browser/w3c_rtc.js +3882 -0
  75. package/externs/browser/w3c_screen_orientation.js +53 -0
  76. package/externs/browser/w3c_screen_wake_lock.js +58 -0
  77. package/externs/browser/w3c_selection.js +209 -0
  78. package/externs/browser/w3c_selectors.js +113 -0
  79. package/externs/browser/w3c_serviceworker.js +739 -0
  80. package/externs/browser/w3c_speech.js +426 -0
  81. package/externs/browser/w3c_touch_event.js +296 -0
  82. package/externs/browser/w3c_trusted_types.js +142 -0
  83. package/externs/browser/w3c_vibration.js +38 -0
  84. package/externs/browser/w3c_webcodecs.js +1473 -0
  85. package/externs/browser/w3c_webcrypto.js +839 -0
  86. package/externs/browser/w3c_worklets.js +54 -0
  87. package/externs/browser/w3c_xml.js +533 -0
  88. package/externs/browser/web_animations.js +452 -0
  89. package/externs/browser/web_app_manifest.js +50 -0
  90. package/externs/browser/webassembly.js +223 -0
  91. package/externs/browser/webgl.js +3409 -0
  92. package/externs/browser/webgl2.js +2727 -0
  93. package/externs/browser/webgl2_compute.js +1609 -0
  94. package/externs/browser/webkit_css.js +456 -0
  95. package/externs/browser/webkit_dom.js +118 -0
  96. package/externs/browser/webkit_event.js +46 -0
  97. package/externs/browser/webkit_notifications.js +258 -0
  98. package/externs/browser/webkit_usercontent.js +55 -0
  99. package/externs/browser/weblocksapi.js +125 -0
  100. package/externs/browser/webstorage.js +171 -0
  101. package/externs/browser/whatwg_bitmap_context.js +37 -0
  102. package/externs/browser/whatwg_console.js +152 -0
  103. package/externs/browser/whatwg_encoding.js +99 -0
  104. package/externs/browser/whatwg_file_system.js +296 -0
  105. package/externs/browser/wicg_attribution_reporting.js +42 -0
  106. package/externs/browser/wicg_compression_stream.js +60 -0
  107. package/externs/browser/wicg_constructable_stylesheets.js +60 -0
  108. package/externs/browser/wicg_entries.js +169 -0
  109. package/externs/browser/wicg_file_handling.js +41 -0
  110. package/externs/browser/wicg_file_system_access.js +191 -0
  111. package/externs/browser/wicg_floc.js +41 -0
  112. package/externs/browser/wicg_ink.js +89 -0
  113. package/externs/browser/wicg_resizeobserver.js +100 -0
  114. package/externs/browser/wicg_scheduler.js +62 -0
  115. package/externs/browser/wicg_trust_token.js +89 -0
  116. package/externs/browser/wicg_uach.js +100 -0
  117. package/externs/browser/window.js +190 -0
  118. package/externs/es3.js +2716 -0
  119. package/externs/es5.js +284 -0
  120. package/externs/es6.js +2554 -0
  121. package/externs/es6_collections.js +323 -0
  122. package/index.js +13 -16
  123. package/lib/grunt/index.js +71 -92
  124. package/lib/grunt/vinyl-stream.js +12 -18
  125. package/lib/gulp/concat-to-json.js +30 -18
  126. package/lib/gulp/index.js +174 -181
  127. package/lib/gulp/json-to-vinyl.js +8 -8
  128. package/lib/node/{closure-compiler.js → index.js} +27 -51
  129. package/lib/utils.js +16 -14
  130. package/package.json +19 -16
  131. package/lib/logger.js +0 -89
@@ -0,0 +1,839 @@
1
+ /*
2
+ * Copyright 2015 The Closure Compiler Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ /**
19
+ * @fileoverview Definitions for W3C's Web Cryptography specification
20
+ * http://www.w3.org/TR/webCryptoAPI
21
+ * @externs
22
+ * @author chrismoon@google.com (Chris Moon)
23
+ * This file was created using the best practices as described in:
24
+ * chrome_extensions.js
25
+ */
26
+
27
+
28
+ /**
29
+ * @const
30
+ * @see http://www.w3.org/TR/webCryptoAPI
31
+ */
32
+ var webCrypto = {};
33
+
34
+
35
+ /**
36
+ * @typedef {?{
37
+ * name: string
38
+ * }}
39
+ * @see http://www.w3.org/TR/WebCryptoAPI/#algorithm-dictionary
40
+ */
41
+ webCrypto.Algorithm;
42
+
43
+
44
+ /**
45
+ * @typedef {string|!webCrypto.Algorithm}
46
+ * @see http://www.w3.org/TR/WebCryptoAPI/#dfn-AlgorithmIdentifier
47
+ */
48
+ webCrypto.AlgorithmIdentifier;
49
+
50
+ /**
51
+ * @typedef {webCrypto.AlgorithmIdentifier}
52
+ * @see http://www.w3.org/TR/WebCryptoAPI/#dfn-HashAlgorithmIdentifier
53
+ */
54
+ webCrypto.HashAlgorithmIdentifier;
55
+
56
+
57
+ /**
58
+ * @typedef {Uint8Array}
59
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-BigInteger
60
+ */
61
+ webCrypto.BigInteger;
62
+
63
+
64
+ /**
65
+ * @constructor
66
+ * @see http://www.w3.org/TR/webCryptoAPI/#dfn-CryptoKey
67
+ */
68
+ function CryptoKey() {}
69
+
70
+
71
+ /**
72
+ * @type {string} An enumerated value representing the type of the key, a secret
73
+ * key (for symmetric algorithm), a public or a private key
74
+ * (for an asymmetric algorithm).
75
+ */
76
+ CryptoKey.prototype.type;
77
+
78
+
79
+ /**
80
+ * @type {boolean} Determines whether or not the raw keying material may be
81
+ * exported by the application.
82
+ */
83
+ CryptoKey.prototype.extractable;
84
+
85
+
86
+ /**
87
+ * @type {!Object} An opaque object representing a particular cipher the key
88
+ * has to be used with.
89
+ */
90
+ CryptoKey.prototype.algorithm;
91
+
92
+
93
+ /**
94
+ * @type {!Object} Returns the cached ECMAScript object associated with the
95
+ * usages internal slot, which indicates which cryptographic operations are
96
+ * permissible to be used with this key.
97
+ */
98
+ CryptoKey.prototype.usages;
99
+
100
+
101
+ /**
102
+ * @constructor
103
+ * @see https://www.w3.org/TR/WebCryptoAPI/#keypair
104
+ */
105
+ function CryptoKeyPair() {}
106
+
107
+
108
+ /**
109
+ * @type {!CryptoKey}
110
+ */
111
+ CryptoKeyPair.prototype.publicKey;
112
+
113
+
114
+ /**
115
+ * @type {!CryptoKey}
116
+ */
117
+ CryptoKeyPair.prototype.privateKey;
118
+
119
+
120
+ /** Duplicate CryptoKey{Pair} in webCrypto namespace for backwards-compatibility. */
121
+
122
+
123
+ /** @typedef {!CryptoKey} */
124
+ webCrypto.CryptoKey;
125
+
126
+
127
+ /** @typedef {!CryptoKeyPair} */
128
+ webCrypto.CryptoKeyPair;
129
+
130
+
131
+ /**
132
+ * @typedef {?{
133
+ * name: string
134
+ * }}
135
+ * @see http://www.w3.org/TR/WebCryptoAPI/#key-algorithm-dictionary-members
136
+ */
137
+ webCrypto.KeyAlgorithm;
138
+
139
+
140
+ /**
141
+ * @constructor
142
+ * @see http://www.w3.org/TR/WebCryptoAPI/#dfn-JsonWebKey
143
+ * @see Section 3.1:
144
+ * https://tools.ietf.org/html/draft-ietf-jose-json-web-key-41
145
+ */
146
+ webCrypto.JsonWebKey = function() {};
147
+
148
+
149
+ /**
150
+ * @type {string} Identifies the cryptographic algorithm family used with
151
+ * the key, such as "RSA" or "EC".
152
+ */
153
+ webCrypto.JsonWebKey.prototype.kty;
154
+
155
+
156
+ /**
157
+ * @type {string} Identifies the intended use of the public key.
158
+ */
159
+ webCrypto.JsonWebKey.prototype.use;
160
+
161
+
162
+ /**
163
+ * @type {!Array<string>} Identifies the operation(s) that the key is
164
+ * intended to be used for.
165
+ */
166
+ webCrypto.JsonWebKey.prototype.key_ops;
167
+
168
+
169
+ /**
170
+ * @type {string} Identifies the algorithm intended for use with the key.
171
+ */
172
+ webCrypto.JsonWebKey.prototype.alg;
173
+
174
+
175
+ /**
176
+ * @type {boolean} Boolean to be used with kty values.
177
+ */
178
+ webCrypto.JsonWebKey.prototype.ext;
179
+
180
+
181
+ /**
182
+ * @type {string} Identifies the cryptographic curve used with the key.
183
+ */
184
+ webCrypto.JsonWebKey.prototype.crv;
185
+
186
+
187
+ /**
188
+ * @type {string} Contains the x coordinate for the elliptic curve point.
189
+ */
190
+ webCrypto.JsonWebKey.prototype.x;
191
+
192
+
193
+ /**
194
+ * @type {string} Contains the y coordinate for the elliptic curve point.
195
+ */
196
+ webCrypto.JsonWebKey.prototype.y;
197
+
198
+
199
+ /**
200
+ * @type {string} Contains the Elliptic Curve private key value.
201
+ */
202
+ webCrypto.JsonWebKey.prototype.d;
203
+
204
+
205
+ /**
206
+ * @type {string} Contains the modulus value for the RSA public key.
207
+ */
208
+ webCrypto.JsonWebKey.prototype.n;
209
+
210
+
211
+ /**
212
+ * @type {string} Contains the exponent value for the RSA public key.
213
+ */
214
+ webCrypto.JsonWebKey.prototype.e;
215
+
216
+
217
+ /**
218
+ * @type {string} Contains the first prime factor.
219
+ */
220
+ webCrypto.JsonWebKey.prototype.p;
221
+
222
+
223
+ /**
224
+ * @type {string} Contains the second prime factor.
225
+ */
226
+ webCrypto.JsonWebKey.prototype.q;
227
+
228
+
229
+ /**
230
+ * @type {string} Contains the Chinese Remainder Theorem (CRT) exponent of
231
+ * the first factor.
232
+ */
233
+ webCrypto.JsonWebKey.prototype.dp;
234
+
235
+
236
+ /**
237
+ * @type {string} Contains the Chinese Remainder Theorem (CRT) exponent of
238
+ * the second factor.
239
+ */
240
+ webCrypto.JsonWebKey.prototype.dq;
241
+
242
+
243
+ /**
244
+ * @type {string} Contains the Chinese Remainder Theorem (CRT) coefficient
245
+ * of the second factor.
246
+ */
247
+ webCrypto.JsonWebKey.prototype.qi;
248
+
249
+
250
+ /**
251
+ * @type {!Array<!webCrypto.RsaOtherPrimesInfo>} Contains an array of
252
+ * information about any third and subsequent primes, should they exist.
253
+ */
254
+ webCrypto.JsonWebKey.prototype.oth;
255
+
256
+
257
+ /**
258
+ * @type {string} Contains the value of the symmetric (or other
259
+ * single-valued) key.
260
+ */
261
+ webCrypto.JsonWebKey.prototype.k;
262
+
263
+
264
+ /**
265
+ * @constructor
266
+ * @see http://www.w3.org/TR/WebCryptoAPI/#dfn-RsaOtherPrimesInfo
267
+ * @see Section-6.3.2.7:
268
+ * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40
269
+ */
270
+ webCrypto.RsaOtherPrimesInfo = function() {};
271
+
272
+
273
+ /**
274
+ * @type {string} Parameter within an "oth" array member represents the value
275
+ * of a subsequent prime factor.
276
+ */
277
+ webCrypto.RsaOtherPrimesInfo.prototype.r;
278
+
279
+
280
+ /**
281
+ * @type {string} Parameter within an "oth" array member represents the CRT
282
+ * exponent of the corresponding prime factor.
283
+ */
284
+ webCrypto.RsaOtherPrimesInfo.prototype.d;
285
+
286
+
287
+ /**
288
+ * @type {string} Parameter within an "oth" array member represents the CRT
289
+ * coefficient of the corresponding prime factor.
290
+ */
291
+ webCrypto.RsaOtherPrimesInfo.prototype.t;
292
+
293
+
294
+ /**
295
+ * @record
296
+ * @extends webCrypto.Algorithm
297
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-RsaKeyGenParams
298
+ */
299
+ webCrypto.RsaKeyGenParams = function() {};
300
+ /**
301
+ * @type {number}
302
+ */
303
+ webCrypto.RsaKeyGenParams.prototype.modulusLength;
304
+ /**
305
+ * @type {webCrypto.BigInteger}
306
+ */
307
+ webCrypto.RsaKeyGenParams.prototype.publicExponent;
308
+
309
+
310
+ /**
311
+ * @record
312
+ * @extends webCrypto.RsaKeyGenParams
313
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-RsaHashedKeyGenParams
314
+ */
315
+ webCrypto.RsaHashedKeyGenParams = function() {};
316
+ /**
317
+ * @type {webCrypto.HashAlgorithmIdentifier}
318
+ */
319
+ webCrypto.RsaHashedKeyGenParams.prototype.hash;
320
+
321
+
322
+ /**
323
+ * @record
324
+ * @extends webCrypto.KeyAlgorithm
325
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-RsaKeyAlgorithm
326
+ */
327
+ webCrypto.RsaKeyAlgorithm = function() {};
328
+ /**
329
+ * @type {number}
330
+ */
331
+ webCrypto.RsaKeyAlgorithm.prototype.modulusLength;
332
+ /**
333
+ * @type {webCrypto.BigInteger}
334
+ */
335
+ webCrypto.RsaKeyAlgorithm.prototype.publicExponent;
336
+
337
+
338
+ /**
339
+ * @record
340
+ * @extends webCrypto.RsaKeyAlgorithm
341
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-RsaHashedKeyAlgorithm
342
+ */
343
+ webCrypto.RsaHashedKeyAlgorithm = function() {};
344
+ /**
345
+ * @type {webCrypto.KeyAlgorithm}
346
+ */
347
+ webCrypto.RsaHashedKeyAlgorithm.prototype.hash;
348
+
349
+
350
+ /**
351
+ * @record
352
+ * @extends webCrypto.Algorithm
353
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-RsaHashedImportParams
354
+ */
355
+ webCrypto.RsaHashedImportParams = function() {};
356
+ /**
357
+ * @type {webCrypto.HashAlgorithmIdentifier}
358
+ */
359
+ webCrypto.RsaHashedImportParams.prototype.hash;
360
+
361
+
362
+ /**
363
+ * @record
364
+ * @extends webCrypto.Algorithm
365
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-RsaPssParams
366
+ */
367
+ webCrypto.RsaPssParams = function() {};
368
+ /**
369
+ * @type {number}
370
+ */
371
+ webCrypto.RsaPssParams.prototype.saltLength;
372
+
373
+
374
+ /**
375
+ * @record
376
+ * @extends webCrypto.Algorithm
377
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-RsaOaepParams
378
+ */
379
+ webCrypto.RsaOaepParams = function() {};
380
+ /**
381
+ * @type {undefined|!BufferSource}
382
+ */
383
+ webCrypto.RsaOaepParams.prototype.label;
384
+
385
+
386
+ /**
387
+ * @record
388
+ * @extends webCrypto.Algorithm
389
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-EcdsaParams
390
+ */
391
+ webCrypto.EcdsaParams = function() {};
392
+ /**
393
+ * @type {!webCrypto.HashAlgorithmIdentifier}
394
+ */
395
+ webCrypto.EcdsaParams.prototype.hash;
396
+
397
+
398
+ /**
399
+ * @typedef {string}
400
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-NamedCurve
401
+ */
402
+ webCrypto.NamedCurve;
403
+
404
+
405
+ /**
406
+ * @record
407
+ * @extends webCrypto.Algorithm
408
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-EcKeyGenParams
409
+ */
410
+ webCrypto.EcKeyGenParams = function() {};
411
+ /**
412
+ * @type {!webCrypto.NamedCurve}
413
+ */
414
+ webCrypto.EcKeyGenParams.prototype.namedCurve;
415
+
416
+
417
+ /**
418
+ * @record
419
+ * @extends webCrypto.KeyAlgorithm
420
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-EcKeyAlgorithm
421
+ */
422
+ webCrypto.EcKeyAlgorithm = function() {};
423
+ /**
424
+ * @type {!webCrypto.NamedCurve}
425
+ */
426
+ webCrypto.EcKeyAlgorithm.prototype.namedCurve;
427
+
428
+
429
+ /**
430
+ * @record
431
+ * @extends webCrypto.Algorithm
432
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-EcKeyImportParams
433
+ */
434
+ webCrypto.EcKeyImportParams = function() {};
435
+ /**
436
+ * @type {!webCrypto.NamedCurve}
437
+ */
438
+ webCrypto.EcKeyImportParams.prototype.namedCurve;
439
+
440
+
441
+ /**
442
+ * @record
443
+ * @extends webCrypto.Algorithm
444
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-EcKeyDeriveParams
445
+ */
446
+ webCrypto.EcKeyDeriveParams = function() {};
447
+ /**
448
+ * @type {!webCrypto.CryptoKey}
449
+ */
450
+ webCrypto.EcKeyDeriveParams.prototype.public;
451
+
452
+
453
+ /**
454
+ * @record
455
+ * @extends webCrypto.Algorithm
456
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-AesCtrParams
457
+ */
458
+ webCrypto.AesCtrParams = function() {};
459
+ /**
460
+ * @type {!BufferSource}
461
+ */
462
+ webCrypto.AesCtrParams.prototype.counter;
463
+ /**
464
+ * @type {number}
465
+ */
466
+ webCrypto.AesCtrParams.prototype.length;
467
+
468
+
469
+ /**
470
+ * @record
471
+ * @extends webCrypto.KeyAlgorithm
472
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-AesKeyAlgorithm
473
+ */
474
+ webCrypto.AesKeyAlgorithm = function() {};
475
+ /**
476
+ * @type {number}
477
+ */
478
+ webCrypto.AesKeyAlgorithm.prototype.length;
479
+
480
+
481
+ /**
482
+ * @record
483
+ * @extends webCrypto.Algorithm
484
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-AesKeyGenParams
485
+ */
486
+ webCrypto.AesKeyGenParams = function() {};
487
+ /**
488
+ * @type {number}
489
+ */
490
+ webCrypto.AesKeyGenParams.prototype.length;
491
+
492
+
493
+ /**
494
+ * @record
495
+ * @extends webCrypto.Algorithm
496
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-AesDerivedKeyParams
497
+ */
498
+ webCrypto.AesDerivedKeyParams = function() {};
499
+ /**
500
+ * @type {number}
501
+ */
502
+ webCrypto.AesDerivedKeyParams.prototype.length;
503
+
504
+
505
+ /**
506
+ * @record
507
+ * @extends webCrypto.Algorithm
508
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-AesCbcParams
509
+ */
510
+ webCrypto.AesCbcParams = function() {};
511
+ /**
512
+ * @type {!BufferSource}
513
+ */
514
+ webCrypto.AesCbcParams.prototype.iv;
515
+
516
+
517
+ /**
518
+ * @record
519
+ * @extends webCrypto.Algorithm
520
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-AesGcmParams
521
+ */
522
+ webCrypto.AesGcmParams = function() {};
523
+ /**
524
+ * @type {!BufferSource}
525
+ */
526
+ webCrypto.AesGcmParams.prototype.iv;
527
+ /**
528
+ * @type {undefined|!BufferSource}
529
+ */
530
+ webCrypto.AesGcmParams.prototype.additionalData;
531
+ /**
532
+ * @type {undefined|number}
533
+ */
534
+ webCrypto.AesGcmParams.prototype.tagLength;
535
+
536
+
537
+ /**
538
+ * @record
539
+ * @extends webCrypto.Algorithm
540
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-HmacImportParams
541
+ */
542
+ webCrypto.HmacImportParams = function() {};
543
+ /**
544
+ * @type {!webCrypto.HashAlgorithmIdentifier}
545
+ */
546
+ webCrypto.HmacImportParams.prototype.hash;
547
+ /**
548
+ * @type {undefined|number}
549
+ */
550
+ webCrypto.HmacImportParams.prototype.length;
551
+
552
+
553
+ /**
554
+ * @record
555
+ * @extends webCrypto.KeyAlgorithm
556
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-HmacKeyAlgorithm
557
+ */
558
+ webCrypto.HmacKeyAlgorithm = function() {};
559
+ /**
560
+ * @type {!webCrypto.KeyAlgorithm}
561
+ */
562
+ webCrypto.HmacKeyAlgorithm.prototype.hash;
563
+ /**
564
+ * @type {number}
565
+ */
566
+ webCrypto.HmacKeyAlgorithm.prototype.length;
567
+
568
+
569
+ /**
570
+ * @record
571
+ * @extends webCrypto.Algorithm
572
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-HmacKeyGenParams
573
+ */
574
+ webCrypto.HmacKeyGenParams = function() {};
575
+ /**
576
+ * @type {!webCrypto.HashAlgorithmIdentifier}
577
+ */
578
+ webCrypto.HmacKeyGenParams.prototype.hash;
579
+ /**
580
+ * @type {undefined|number}
581
+ */
582
+ webCrypto.HmacKeyGenParams.prototype.length;
583
+
584
+
585
+ /**
586
+ * @record
587
+ * @extends webCrypto.Algorithm
588
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-HkdfParams
589
+ */
590
+ webCrypto.HkdfParams = function() {};
591
+ /**
592
+ * @type {!webCrypto.HashAlgorithmIdentifier}
593
+ */
594
+ webCrypto.HkdfParams.prototype.hash;
595
+ /**
596
+ * @type {!BufferSource}
597
+ */
598
+ webCrypto.HkdfParams.prototype.salt;
599
+ /**
600
+ * @type {!BufferSource}
601
+ */
602
+ webCrypto.HkdfParams.prototype.info;
603
+
604
+
605
+ /**
606
+ * @record
607
+ * @extends webCrypto.Algorithm
608
+ * @see https://www.w3.org/TR/WebCryptoAPI/#dfn-Pbkdf2Params
609
+ */
610
+ webCrypto.Pbkdf2Params = function() {};
611
+ /**
612
+ * @type {!BufferSource}
613
+ */
614
+ webCrypto.Pbkdf2Params.prototype.salt;
615
+ /**
616
+ * @type {number}
617
+ */
618
+ webCrypto.Pbkdf2Params.prototype.iterations;
619
+ /**
620
+ * @type {!webCrypto.HashAlgorithmIdentifier}
621
+ */
622
+ webCrypto.Pbkdf2Params.prototype.hash;
623
+
624
+
625
+ /**
626
+ * @constructor
627
+ * @see http://www.w3.org/TR/WebCryptoAPI/#subtlecrypto-interface
628
+ */
629
+ webCrypto.SubtleCrypto = function() {};
630
+
631
+
632
+ /**
633
+ * @param {!webCrypto.AlgorithmIdentifier} algorithm Supported
634
+ * values are: AES-CBC, AES-CTR, AES-GCM, and RSA-OAEP.
635
+ * @param {!webCrypto.CryptoKey} key Key to be used for signing.
636
+ * @param {!BufferSource} data Data to be encrypted (cleartext).
637
+ * @return {!Promise<!ArrayBuffer>} Ciphertext generated by the encryption of
638
+ * the cleartext.
639
+ */
640
+ webCrypto.SubtleCrypto.prototype.encrypt = function(algorithm, key,
641
+ data) {};
642
+
643
+
644
+ /**
645
+ * @param {!webCrypto.AlgorithmIdentifier} algorithm Supported
646
+ * values are: AES-CBC, AES-CTR, AES-GCM, and RSA-OAEP.
647
+ * @param {!webCrypto.CryptoKey} key Key to be used for signing.
648
+ * @param {!BufferSource} data Data to be decrypted (ciphertext).
649
+ * @return {!Promise<!ArrayBuffer>} Cleartext generated by the decryption of the
650
+ * ciphertext.
651
+ */
652
+ webCrypto.SubtleCrypto.prototype.decrypt = function(algorithm, key,
653
+ data) {};
654
+
655
+
656
+ /**
657
+ * @param {!webCrypto.AlgorithmIdentifier} algorithm Supported
658
+ * values are: HMAC, RSASSA-PKCS1-v1_5, and ECDSA.
659
+ * @param {!webCrypto.CryptoKey} key Private key to be used for signing.
660
+ * @param {!BufferSource} data Data to be signed.
661
+ * @return {!Promise<!ArrayBuffer>} Returns the signature on success.
662
+ */
663
+ webCrypto.SubtleCrypto.prototype.sign = function(algorithm, key,
664
+ data) {};
665
+
666
+
667
+ /**
668
+ * @param {!webCrypto.AlgorithmIdentifier} algorithm Supported
669
+ * values are: HMAC, RSASSA-PKCS1-v1_5, and ECDSA.
670
+ * @param {!webCrypto.CryptoKey} key Private key to be used for signing.
671
+ * @param {!BufferSource} signature Signature to verify.
672
+ * @param {!BufferSource} data Data whose signature needs to be verified.
673
+ * @return {!Promise<boolean>} Returns if the signature operating has been
674
+ * successful.
675
+ */
676
+ webCrypto.SubtleCrypto.prototype.verify = function(algorithm, key,
677
+ signature, data) {};
678
+
679
+
680
+ /**
681
+ * @param {!webCrypto.AlgorithmIdentifier} algorithm Supported
682
+ * values are: SHA-1, SHA-256, SHA-384, and SHA-512.
683
+ * @param {!BufferSource} data Data to be hashed using the hashing algorithm.
684
+ * @return {!Promise<!ArrayBuffer>} returns the hash on success.
685
+ */
686
+ webCrypto.SubtleCrypto.prototype.digest = function(algorithm, data) {};
687
+
688
+
689
+ /**
690
+ * @param {!webCrypto.AlgorithmIdentifier|webCrypto.RsaHashedKeyGenParams}
691
+ * algorithm Supported values are: SHA-1, SHA-256, SHA-384, and SHA-512.
692
+ * @param {boolean} extractable If the key can be extracted from the CryptoKey
693
+ * object at a later stage.
694
+ * @param {!Array<string>} keyUsages Indication of new key options i.e.
695
+ * encrypt, decrypt, sign, verify, deriveKey, deriveBits, wrapKey,
696
+ * unwrapKey.
697
+ * @return {!Promise<!webCrypto.CryptoKey|!webCrypto.CryptoKeyPair>} returns the
698
+ * generated key.
699
+ */
700
+ webCrypto.SubtleCrypto.prototype.generateKey = function(algorithm,
701
+ extractable, keyUsages) {};
702
+
703
+
704
+ /**
705
+ * @param {!webCrypto.AlgorithmIdentifier} algorithm The key derivation
706
+ * algorithm to use. Supported values are: ECDH, DH, PBKDF2, and HKDF-CTR.
707
+ * @param {!webCrypto.CryptoKey} baseKey Key to be used by the key
708
+ * derivation algorithm.
709
+ * @param {!webCrypto.AlgorithmIdentifier} derivedKeyAlgo Defines the key
710
+ * derivation algorithm to use.
711
+ * @param {boolean} extractable Indicates if the key can be extracted from the
712
+ * CryptoKey object at a later stage.
713
+ * @param {!Array<string>} keyUsages Indicates what can be done with the
714
+ * derivated key.
715
+ * @return {!Promise<!webCrypto.CryptoKey|!webCrypto.CryptoKeyPair>} returns the
716
+ * generated key.
717
+ */
718
+ webCrypto.SubtleCrypto.prototype.deriveKey = function(algorithm,
719
+ baseKey, derivedKeyAlgo, extractable, keyUsages) {};
720
+
721
+
722
+ /**
723
+ * @param {!webCrypto.AlgorithmIdentifier} algorithm The key derivation
724
+ * algorithm to use.
725
+ * @param {!webCrypto.CryptoKey} baseKey Key to be used by the key
726
+ * derivation algorithm.
727
+ * @param {number} length
728
+ * @return {!Promise<!ArrayBuffer>} returns the generated bits.
729
+ */
730
+ webCrypto.SubtleCrypto.prototype.deriveBits = function(algorithm,
731
+ baseKey, length) {};
732
+
733
+
734
+ /**
735
+ * @param {string} format Enumerated value describing the data
736
+ * format of the key to imported.
737
+ * @param {!BufferSource|!webCrypto.JsonWebKey} keyData The key
738
+ * in the given format.
739
+ * @param {!webCrypto.AlgorithmIdentifier|webCrypto.RsaHashedImportParams}
740
+ * algorithm Supported values are: AES-CTR, AES-CBC, AES-GCM, RSA-OAEP,
741
+ * AES-KW, HMAC, RSASSA-PKCS1-v1_5, ECDSA, ECDH, DH.
742
+ * @param {boolean} extractable If the key can be extracted from the CryptoKey
743
+ * object at a later stage.
744
+ * @param {!Array<string>} keyUsages Indication of new key options i.e.
745
+ * encrypt, decrypt, sign, verify, deriveKey, deriveBits, wrapKey,
746
+ * unwrapKey.
747
+ * @return {!Promise<!webCrypto.CryptoKey>} returns the generated key.
748
+ */
749
+ webCrypto.SubtleCrypto.prototype.importKey = function(format, keyData,
750
+ algorithm, extractable, keyUsages) {};
751
+
752
+
753
+ /**
754
+ * @param {string} format Enumerated value describing the data
755
+ * format of the key to imported.
756
+ * @param {!webCrypto.CryptoKey} key CryptoKey to export.
757
+ * @return {!Promise<!ArrayBuffer|!webCrypto.JsonWebKey>} returns the key in the
758
+ * requested format.
759
+ */
760
+ webCrypto.SubtleCrypto.prototype.exportKey = function(format, key) {};
761
+
762
+
763
+ /**
764
+ * @param {string} format Value describing the data format in which the key must
765
+ * be wrapped. It can be one of the following: raw, pkcs8, spki, jwk.
766
+ * @param {!webCrypto.CryptoKey} key CryptoKey to wrap.
767
+ * @param {!webCrypto.CryptoKey} wrappingKey CryptoKey used to perform
768
+ * the wrapping.
769
+ * @param {!webCrypto.AlgorithmIdentifier} wrapAlgorithm algorithm used
770
+ * to perform the wrapping. It is one of the following: AES-CBC, AES-CTR,
771
+ * AES-GCM, RSA-OAEP, and AES-KW.
772
+ * @return {!Promise<!ArrayBuffer>} returns the wrapped key in the requested
773
+ * format.
774
+ */
775
+ webCrypto.SubtleCrypto.prototype.wrapKey = function(format,
776
+ key, wrappingKey, wrapAlgorithm) {};
777
+
778
+
779
+ /**
780
+ * @param {string} format Value describing the data format in which the key must
781
+ * be wrapped. It can be one of the following: raw, pkcs8, spki, jwk.
782
+ * @param {!BufferSource} wrappedKey Contains the wrapped key in the given
783
+ * format.
784
+ * @param {!webCrypto.CryptoKey} unwrappingKey CryptoKey used to perform
785
+ * the unwrapping.
786
+ * @param {!webCrypto.AlgorithmIdentifier} unwrapAlgorithm Algorithm
787
+ * used to perform the unwrapping. It is one of the following: AES-CBC,
788
+ * AES-CTR, AES-GCM, RSA-OAEP, and AES-KW.
789
+ * @param {!webCrypto.AlgorithmIdentifier} unwrappedKeyAlgorithm
790
+ * Represents the algorithm of the wrapped key.
791
+ * @param {boolean} extractable Indicates if the key can be extracted from the
792
+ * CryptoKey object at a later stage.
793
+ * @param {!Array<string>} keyUsages Indicates what can be done with the
794
+ * derivated key.
795
+ * @return {!Promise<!webCrypto.CryptoKey>} returns the unwrapped key.
796
+ */
797
+ webCrypto.SubtleCrypto.prototype.unwrapKey = function(format, wrappedKey,
798
+ unwrappingKey, unwrapAlgorithm, unwrappedKeyAlgorithm, extractable,
799
+ keyUsages) {};
800
+
801
+
802
+ /**
803
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto
804
+ * @interface
805
+ */
806
+ webCrypto.Crypto = function() {};
807
+
808
+ /**
809
+ * @see https://developer.mozilla.org/en/DOM/window.crypto.getRandomValues
810
+ * @param {!Int8Array|!Uint8Array|!Uint8ClampedArray|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
811
+ * typedArray
812
+ * @return {!Int8Array|!Uint8Array|!Uint8ClampedArray|!Int16Array|!Uint16Array|!Int32Array|!Uint32Array|!BigInt64Array|!BigUint64Array}
813
+ * @throws {Error}
814
+ */
815
+ webCrypto.Crypto.prototype.getRandomValues = function(typedArray) {};
816
+
817
+ /**
818
+ * @see https://developer.mozilla.org/en/docs/Web/API/Crypto/randomUUID
819
+ * @return {string}
820
+ */
821
+ webCrypto.Crypto.prototype.randomUUID = function() {};
822
+
823
+ /**
824
+ * @type {?webCrypto.SubtleCrypto}
825
+ * @see http://www.w3.org/TR/WebCryptoAPI/#Crypto-attribute-subtle
826
+ */
827
+ webCrypto.Crypto.prototype.subtle;
828
+
829
+ /**
830
+ * @see https://developer.mozilla.org/en/DOM/window.crypto
831
+ * @type {!webCrypto.Crypto|undefined}
832
+ */
833
+ var crypto;
834
+
835
+ /**
836
+ * @type {!webCrypto.Crypto}
837
+ * @see https://www.w3.org/TR/WebCryptoAPI/#crypto-interface
838
+ */
839
+ WorkerGlobalScope.prototype.crypto;