pdfjs-dist 2.1.266 → 2.5.207

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.

Potentially problematic release.


This version of pdfjs-dist might be problematic. Click here for more details.

Files changed (191) hide show
  1. package/CODE_OF_CONDUCT.md +15 -0
  2. package/README.md +4 -0
  3. package/bower.json +1 -1
  4. package/build/pdf.js +8382 -18492
  5. package/build/pdf.js.map +1 -1
  6. package/build/pdf.min.js +22 -1
  7. package/build/pdf.worker.entry.js +5 -3
  8. package/build/pdf.worker.js +20417 -29816
  9. package/build/pdf.worker.js.map +1 -1
  10. package/build/pdf.worker.min.js +22 -1
  11. package/es5/build/pdf.js +25688 -0
  12. package/es5/build/pdf.js.map +1 -0
  13. package/{lib/shared/global_scope.js → es5/build/pdf.worker.entry.js} +5 -10
  14. package/es5/build/pdf.worker.js +58239 -0
  15. package/es5/build/pdf.worker.js.map +1 -0
  16. package/es5/web/images/annotation-check.svg +11 -0
  17. package/es5/web/images/annotation-comment.svg +16 -0
  18. package/es5/web/images/annotation-help.svg +26 -0
  19. package/es5/web/images/annotation-insert.svg +10 -0
  20. package/es5/web/images/annotation-key.svg +11 -0
  21. package/es5/web/images/annotation-newparagraph.svg +11 -0
  22. package/es5/web/images/annotation-noicon.svg +7 -0
  23. package/es5/web/images/annotation-note.svg +42 -0
  24. package/es5/web/images/annotation-paragraph.svg +16 -0
  25. package/es5/web/images/loading-icon.gif +0 -0
  26. package/es5/web/images/shadow.png +0 -0
  27. package/es5/web/images/texture.png +0 -0
  28. package/es5/web/pdf_viewer.css +403 -0
  29. package/es5/web/pdf_viewer.js +7742 -0
  30. package/es5/web/pdf_viewer.js.map +1 -0
  31. package/image_decoders/pdf.image_decoders.js +1475 -4897
  32. package/image_decoders/pdf.image_decoders.js.map +1 -1
  33. package/image_decoders/pdf.image_decoders.min.js +22 -1
  34. package/lib/README.md +7 -0
  35. package/lib/core/annotation.js +750 -899
  36. package/lib/core/arithmetic_decoder.js +81 -97
  37. package/lib/core/bidi.js +54 -46
  38. package/lib/core/ccitt.js +88 -81
  39. package/lib/core/ccitt_stream.js +15 -14
  40. package/lib/core/cff_parser.js +235 -183
  41. package/lib/core/charsets.js +4 -4
  42. package/lib/core/chunked_stream.js +447 -542
  43. package/lib/core/cmap.js +222 -264
  44. package/lib/core/colorspace.js +699 -863
  45. package/lib/core/core_utils.js +152 -0
  46. package/lib/core/crypto.js +379 -437
  47. package/lib/core/document.js +573 -660
  48. package/lib/core/encodings.js +15 -15
  49. package/lib/core/evaluator.js +1103 -868
  50. package/lib/core/font_renderer.js +135 -178
  51. package/lib/core/fonts.js +570 -491
  52. package/lib/core/function.js +291 -288
  53. package/lib/core/glyphlist.js +4527 -4526
  54. package/lib/core/image.js +145 -149
  55. package/lib/core/image_utils.js +170 -0
  56. package/lib/core/jbig2.js +325 -316
  57. package/lib/core/jbig2_stream.js +18 -17
  58. package/lib/core/jpeg_stream.js +21 -26
  59. package/lib/core/jpg.js +284 -232
  60. package/lib/core/jpx.js +161 -143
  61. package/lib/core/jpx_stream.js +28 -28
  62. package/lib/core/metrics.js +2929 -2929
  63. package/lib/core/murmurhash3.js +90 -101
  64. package/lib/core/obj.js +1183 -1157
  65. package/lib/core/operator_list.js +99 -67
  66. package/lib/core/parser.js +972 -911
  67. package/lib/core/pattern.js +87 -70
  68. package/lib/core/pdf_manager.js +150 -315
  69. package/lib/core/primitives.js +83 -56
  70. package/lib/core/ps_parser.js +175 -214
  71. package/lib/core/standard_fonts.js +237 -236
  72. package/lib/core/stream.js +94 -74
  73. package/lib/core/type1_parser.js +87 -69
  74. package/lib/core/unicode.js +1654 -1654
  75. package/lib/core/worker.js +193 -390
  76. package/lib/core/worker_stream.js +168 -0
  77. package/lib/display/annotation_layer.js +741 -972
  78. package/lib/display/api.js +1500 -1791
  79. package/lib/display/api_compatibility.js +12 -17
  80. package/lib/display/canvas.js +165 -165
  81. package/lib/display/content_disposition.js +40 -59
  82. package/lib/display/display_utils.js +515 -0
  83. package/lib/display/fetch_stream.js +183 -298
  84. package/lib/display/font_loader.js +273 -413
  85. package/lib/display/metadata.js +86 -98
  86. package/lib/display/network.js +266 -359
  87. package/lib/display/network_utils.js +25 -18
  88. package/lib/display/node_stream.js +285 -458
  89. package/lib/display/pattern_helper.js +113 -65
  90. package/lib/display/svg.js +1166 -901
  91. package/lib/display/text_layer.js +156 -132
  92. package/lib/display/transport_stream.js +262 -278
  93. package/lib/display/webgl.js +70 -83
  94. package/lib/display/worker_options.js +3 -3
  95. package/lib/display/xml_parser.js +303 -392
  96. package/lib/examples/node/domstubs.js +40 -37
  97. package/lib/pdf.js +226 -59
  98. package/lib/pdf.worker.js +14 -6
  99. package/lib/shared/compatibility.js +3 -246
  100. package/lib/shared/is_node.js +7 -6
  101. package/lib/shared/message_handler.js +327 -332
  102. package/lib/shared/util.js +266 -416
  103. package/lib/test/unit/annotation_spec.js +1555 -701
  104. package/lib/test/unit/api_spec.js +802 -604
  105. package/lib/test/unit/bidi_spec.js +7 -7
  106. package/lib/test/unit/cff_parser_spec.js +84 -69
  107. package/lib/test/unit/clitests_helper.js +7 -9
  108. package/lib/test/unit/cmap_spec.js +74 -76
  109. package/lib/test/unit/colorspace_spec.js +166 -161
  110. package/lib/test/unit/core_utils_spec.js +211 -0
  111. package/lib/test/unit/crypto_spec.js +181 -181
  112. package/lib/test/unit/custom_spec.js +20 -22
  113. package/lib/test/unit/display_svg_spec.js +34 -39
  114. package/lib/test/unit/display_utils_spec.js +263 -0
  115. package/lib/test/unit/document_spec.js +16 -21
  116. package/lib/test/unit/encodings_spec.js +12 -34
  117. package/lib/test/unit/evaluator_spec.js +83 -83
  118. package/lib/test/unit/fetch_stream_spec.js +111 -0
  119. package/lib/test/unit/function_spec.js +206 -204
  120. package/lib/test/unit/jasmine-boot.js +46 -30
  121. package/lib/test/unit/message_handler_spec.js +173 -159
  122. package/lib/test/unit/metadata_spec.js +69 -69
  123. package/lib/test/unit/murmurhash3_spec.js +12 -12
  124. package/lib/test/unit/network_spec.js +13 -61
  125. package/lib/test/unit/network_utils_spec.js +183 -119
  126. package/lib/test/unit/node_stream_spec.js +78 -92
  127. package/lib/test/unit/parser_spec.js +172 -114
  128. package/lib/test/unit/pdf_find_controller_spec.js +55 -86
  129. package/lib/test/unit/pdf_find_utils_spec.js +32 -32
  130. package/lib/test/unit/pdf_history_spec.js +32 -32
  131. package/lib/test/unit/primitives_spec.js +140 -125
  132. package/lib/test/unit/stream_spec.js +16 -14
  133. package/lib/test/unit/test_utils.js +131 -143
  134. package/lib/test/unit/testreporter.js +19 -19
  135. package/lib/test/unit/type1_parser_spec.js +42 -42
  136. package/lib/test/unit/ui_utils_spec.js +297 -459
  137. package/lib/test/unit/unicode_spec.js +38 -38
  138. package/lib/test/unit/util_spec.js +121 -305
  139. package/lib/web/annotation_layer_builder.js +66 -103
  140. package/lib/web/app.js +1328 -1214
  141. package/lib/web/app_options.js +105 -107
  142. package/lib/web/base_viewer.js +824 -838
  143. package/lib/web/chromecom.js +165 -252
  144. package/lib/web/debugger.js +149 -205
  145. package/lib/web/download_manager.js +39 -55
  146. package/lib/web/firefox_print_service.js +37 -27
  147. package/lib/web/firefoxcom.js +212 -363
  148. package/lib/web/genericcom.js +26 -108
  149. package/lib/web/genericl10n.js +24 -153
  150. package/lib/web/grab_to_pan.js +32 -30
  151. package/lib/web/interfaces.js +80 -254
  152. package/lib/web/overlay_manager.js +70 -246
  153. package/lib/web/password_prompt.js +38 -64
  154. package/lib/web/pdf_attachment_viewer.js +113 -131
  155. package/lib/web/pdf_cursor_tools.js +75 -102
  156. package/lib/web/pdf_document_properties.js +221 -306
  157. package/lib/web/pdf_find_bar.js +136 -170
  158. package/lib/web/pdf_find_controller.js +491 -548
  159. package/lib/web/pdf_find_utils.js +13 -13
  160. package/lib/web/pdf_history.js +397 -406
  161. package/lib/web/pdf_link_service.js +304 -348
  162. package/lib/web/pdf_outline_viewer.js +140 -175
  163. package/lib/web/pdf_page_view.js +452 -523
  164. package/lib/web/pdf_presentation_mode.js +308 -357
  165. package/lib/web/pdf_print_service.js +90 -104
  166. package/lib/web/pdf_rendering_queue.js +84 -108
  167. package/lib/web/pdf_sidebar.js +276 -306
  168. package/lib/web/pdf_sidebar_resizer.js +92 -119
  169. package/lib/web/pdf_single_page_viewer.js +77 -126
  170. package/lib/web/pdf_thumbnail_view.js +276 -297
  171. package/lib/web/pdf_thumbnail_viewer.js +186 -206
  172. package/lib/web/pdf_viewer.component.js +20 -21
  173. package/lib/web/pdf_viewer.js +55 -115
  174. package/lib/web/preferences.js +82 -286
  175. package/lib/web/secondary_toolbar.js +164 -196
  176. package/lib/web/text_layer_builder.js +282 -339
  177. package/lib/web/toolbar.js +217 -210
  178. package/lib/web/ui_utils.js +267 -420
  179. package/lib/web/view_history.js +52 -226
  180. package/lib/web/viewer_compatibility.js +21 -6
  181. package/package.json +2 -9
  182. package/web/pdf_viewer.css +35 -25
  183. package/web/pdf_viewer.js +3489 -4855
  184. package/web/pdf_viewer.js.map +1 -1
  185. package/webpack.js +14 -5
  186. package/external/streams/streams-lib.js +0 -3962
  187. package/external/url/url-lib.js +0 -627
  188. package/lib/display/dom_utils.js +0 -494
  189. package/lib/shared/streams_polyfill.js +0 -43
  190. package/lib/shared/url_polyfill.js +0 -56
  191. package/lib/test/unit/dom_utils_spec.js +0 -89
@@ -2,7 +2,7 @@
2
2
  * @licstart The following is the entire license notice for the
3
3
  * Javascript code in this page
4
4
  *
5
- * Copyright 2018 Mozilla Foundation
5
+ * Copyright 2020 Mozilla Foundation
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
8
8
  * you may not use this file except in compliance with the License.
@@ -21,15 +21,15 @@
21
21
  */
22
22
  "use strict";
23
23
 
24
- var _crypto = require("../../core/crypto");
24
+ var _crypto = require("../../core/crypto.js");
25
25
 
26
- var _primitives = require("../../core/primitives");
26
+ var _primitives = require("../../core/primitives.js");
27
27
 
28
- var _util = require("../../shared/util");
28
+ var _util = require("../../shared/util.js");
29
29
 
30
- describe('crypto', function () {
30
+ describe("crypto", function () {
31
31
  function hex2binary(s) {
32
- var digits = '0123456789ABCDEF';
32
+ var digits = "0123456789ABCDEF";
33
33
  s = s.toUpperCase();
34
34
  var n = s.length >> 1,
35
35
  i,
@@ -46,232 +46,232 @@ describe('crypto', function () {
46
46
  return result;
47
47
  }
48
48
 
49
- describe('calculateMD5', function () {
50
- it('should pass RFC 1321 test #1', function () {
49
+ describe("calculateMD5", function () {
50
+ it("should pass RFC 1321 test #1", function () {
51
51
  var input, result, expected;
52
- input = (0, _util.stringToBytes)('');
52
+ input = (0, _util.stringToBytes)("");
53
53
  result = (0, _crypto.calculateMD5)(input, 0, input.length);
54
- expected = hex2binary('d41d8cd98f00b204e9800998ecf8427e');
54
+ expected = hex2binary("d41d8cd98f00b204e9800998ecf8427e");
55
55
  expect(result).toEqual(expected);
56
56
  });
57
- it('should pass RFC 1321 test #2', function () {
57
+ it("should pass RFC 1321 test #2", function () {
58
58
  var input, result, expected;
59
- input = (0, _util.stringToBytes)('a');
59
+ input = (0, _util.stringToBytes)("a");
60
60
  result = (0, _crypto.calculateMD5)(input, 0, input.length);
61
- expected = hex2binary('0cc175b9c0f1b6a831c399e269772661');
61
+ expected = hex2binary("0cc175b9c0f1b6a831c399e269772661");
62
62
  expect(result).toEqual(expected);
63
63
  });
64
- it('should pass RFC 1321 test #3', function () {
64
+ it("should pass RFC 1321 test #3", function () {
65
65
  var input, result, expected;
66
- input = (0, _util.stringToBytes)('abc');
66
+ input = (0, _util.stringToBytes)("abc");
67
67
  result = (0, _crypto.calculateMD5)(input, 0, input.length);
68
- expected = hex2binary('900150983cd24fb0d6963f7d28e17f72');
68
+ expected = hex2binary("900150983cd24fb0d6963f7d28e17f72");
69
69
  expect(result).toEqual(expected);
70
70
  });
71
- it('should pass RFC 1321 test #4', function () {
71
+ it("should pass RFC 1321 test #4", function () {
72
72
  var input, result, expected;
73
- input = (0, _util.stringToBytes)('message digest');
73
+ input = (0, _util.stringToBytes)("message digest");
74
74
  result = (0, _crypto.calculateMD5)(input, 0, input.length);
75
- expected = hex2binary('f96b697d7cb7938d525a2f31aaf161d0');
75
+ expected = hex2binary("f96b697d7cb7938d525a2f31aaf161d0");
76
76
  expect(result).toEqual(expected);
77
77
  });
78
- it('should pass RFC 1321 test #5', function () {
78
+ it("should pass RFC 1321 test #5", function () {
79
79
  var input, result, expected;
80
- input = (0, _util.stringToBytes)('abcdefghijklmnopqrstuvwxyz');
80
+ input = (0, _util.stringToBytes)("abcdefghijklmnopqrstuvwxyz");
81
81
  result = (0, _crypto.calculateMD5)(input, 0, input.length);
82
- expected = hex2binary('c3fcd3d76192e4007dfb496cca67e13b');
82
+ expected = hex2binary("c3fcd3d76192e4007dfb496cca67e13b");
83
83
  expect(result).toEqual(expected);
84
84
  });
85
- it('should pass RFC 1321 test #6', function () {
85
+ it("should pass RFC 1321 test #6", function () {
86
86
  var input, result, expected;
87
- input = (0, _util.stringToBytes)('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv' + 'wxyz0123456789');
87
+ input = (0, _util.stringToBytes)("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
88
88
  result = (0, _crypto.calculateMD5)(input, 0, input.length);
89
- expected = hex2binary('d174ab98d277d9f5a5611c2c9f419d9f');
89
+ expected = hex2binary("d174ab98d277d9f5a5611c2c9f419d9f");
90
90
  expect(result).toEqual(expected);
91
91
  });
92
- it('should pass RFC 1321 test #7', function () {
92
+ it("should pass RFC 1321 test #7", function () {
93
93
  var input, result, expected;
94
- input = (0, _util.stringToBytes)('123456789012345678901234567890123456789012345678' + '90123456789012345678901234567890');
94
+ input = (0, _util.stringToBytes)("123456789012345678901234567890123456789012345678" + "90123456789012345678901234567890");
95
95
  result = (0, _crypto.calculateMD5)(input, 0, input.length);
96
- expected = hex2binary('57edf4a22be3c955ac49da2e2107b67a');
96
+ expected = hex2binary("57edf4a22be3c955ac49da2e2107b67a");
97
97
  expect(result).toEqual(expected);
98
98
  });
99
99
  });
100
- describe('ARCFourCipher', function () {
101
- it('should pass test #1', function () {
100
+ describe("ARCFourCipher", function () {
101
+ it("should pass test #1", function () {
102
102
  var key, input, result, expected, cipher;
103
- key = hex2binary('0123456789abcdef');
104
- input = hex2binary('0123456789abcdef');
103
+ key = hex2binary("0123456789abcdef");
104
+ input = hex2binary("0123456789abcdef");
105
105
  cipher = new _crypto.ARCFourCipher(key);
106
106
  result = cipher.encryptBlock(input);
107
- expected = hex2binary('75b7878099e0c596');
107
+ expected = hex2binary("75b7878099e0c596");
108
108
  expect(result).toEqual(expected);
109
109
  });
110
- it('should pass test #2', function () {
110
+ it("should pass test #2", function () {
111
111
  var key, input, result, expected, cipher;
112
- key = hex2binary('0123456789abcdef');
113
- input = hex2binary('0000000000000000');
112
+ key = hex2binary("0123456789abcdef");
113
+ input = hex2binary("0000000000000000");
114
114
  cipher = new _crypto.ARCFourCipher(key);
115
115
  result = cipher.encryptBlock(input);
116
- expected = hex2binary('7494c2e7104b0879');
116
+ expected = hex2binary("7494c2e7104b0879");
117
117
  expect(result).toEqual(expected);
118
118
  });
119
- it('should pass test #3', function () {
119
+ it("should pass test #3", function () {
120
120
  var key, input, result, expected, cipher;
121
- key = hex2binary('0000000000000000');
122
- input = hex2binary('0000000000000000');
121
+ key = hex2binary("0000000000000000");
122
+ input = hex2binary("0000000000000000");
123
123
  cipher = new _crypto.ARCFourCipher(key);
124
124
  result = cipher.encryptBlock(input);
125
- expected = hex2binary('de188941a3375d3a');
125
+ expected = hex2binary("de188941a3375d3a");
126
126
  expect(result).toEqual(expected);
127
127
  });
128
- it('should pass test #4', function () {
128
+ it("should pass test #4", function () {
129
129
  var key, input, result, expected, cipher;
130
- key = hex2binary('ef012345');
131
- input = hex2binary('00000000000000000000');
130
+ key = hex2binary("ef012345");
131
+ input = hex2binary("00000000000000000000");
132
132
  cipher = new _crypto.ARCFourCipher(key);
133
133
  result = cipher.encryptBlock(input);
134
- expected = hex2binary('d6a141a7ec3c38dfbd61');
134
+ expected = hex2binary("d6a141a7ec3c38dfbd61");
135
135
  expect(result).toEqual(expected);
136
136
  });
137
- it('should pass test #5', function () {
137
+ it("should pass test #5", function () {
138
138
  var key, input, result, expected, cipher;
139
- key = hex2binary('0123456789abcdef');
140
- input = hex2binary('010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '10101010101010101010101010101010101010101010101010101010101010101010' + '101010101010101010101');
139
+ key = hex2binary("0123456789abcdef");
140
+ input = hex2binary("010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "10101010101010101010101010101010101010101010101010101010101010101010" + "101010101010101010101");
141
141
  cipher = new _crypto.ARCFourCipher(key);
142
142
  result = cipher.encryptBlock(input);
143
- expected = hex2binary('7595c3e6114a09780c4ad452338e1ffd9a1be9498f813d76' + '533449b6778dcad8c78a8d2ba9ac66085d0e53d59c26c2d1c490c1ebbe0ce66d1b6b' + '1b13b6b919b847c25a91447a95e75e4ef16779cde8bf0a95850e32af9689444fd377' + '108f98fdcbd4e726567500990bcc7e0ca3c4aaa304a387d20f3b8fbbcd42a1bd311d' + '7a4303dda5ab078896ae80c18b0af66dff319616eb784e495ad2ce90d7f772a81747' + 'b65f62093b1e0db9e5ba532fafec47508323e671327df9444432cb7367cec82f5d44' + 'c0d00b67d650a075cd4b70dedd77eb9b10231b6b5b741347396d62897421d43df9b4' + '2e446e358e9c11a9b2184ecbef0cd8e7a877ef968f1390ec9b3d35a5585cb009290e' + '2fcde7b5ec66d9084be44055a619d9dd7fc3166f9487f7cb272912426445998514c1' + '5d53a18c864ce3a2b7555793988126520eacf2e3066e230c91bee4dd5304f5fd0405' + 'b35bd99c73135d3d9bc335ee049ef69b3867bf2d7bd1eaa595d8bfc0066ff8d31509' + 'eb0c6caa006c807a623ef84c3d33c195d23ee320c40de0558157c822d4b8c569d849' + 'aed59d4e0fd7f379586b4b7ff684ed6a189f7486d49b9c4bad9ba24b96abf924372c' + '8a8fffb10d55354900a77a3db5f205e1b99fcd8660863a159ad4abe40fa48934163d' + 'dde542a6585540fd683cbfd8c00f12129a284deacc4cdefe58be7137541c047126c8' + 'd49e2755ab181ab7e940b0c0');
143
+ expected = hex2binary("7595c3e6114a09780c4ad452338e1ffd9a1be9498f813d76" + "533449b6778dcad8c78a8d2ba9ac66085d0e53d59c26c2d1c490c1ebbe0ce66d1b6b" + "1b13b6b919b847c25a91447a95e75e4ef16779cde8bf0a95850e32af9689444fd377" + "108f98fdcbd4e726567500990bcc7e0ca3c4aaa304a387d20f3b8fbbcd42a1bd311d" + "7a4303dda5ab078896ae80c18b0af66dff319616eb784e495ad2ce90d7f772a81747" + "b65f62093b1e0db9e5ba532fafec47508323e671327df9444432cb7367cec82f5d44" + "c0d00b67d650a075cd4b70dedd77eb9b10231b6b5b741347396d62897421d43df9b4" + "2e446e358e9c11a9b2184ecbef0cd8e7a877ef968f1390ec9b3d35a5585cb009290e" + "2fcde7b5ec66d9084be44055a619d9dd7fc3166f9487f7cb272912426445998514c1" + "5d53a18c864ce3a2b7555793988126520eacf2e3066e230c91bee4dd5304f5fd0405" + "b35bd99c73135d3d9bc335ee049ef69b3867bf2d7bd1eaa595d8bfc0066ff8d31509" + "eb0c6caa006c807a623ef84c3d33c195d23ee320c40de0558157c822d4b8c569d849" + "aed59d4e0fd7f379586b4b7ff684ed6a189f7486d49b9c4bad9ba24b96abf924372c" + "8a8fffb10d55354900a77a3db5f205e1b99fcd8660863a159ad4abe40fa48934163d" + "dde542a6585540fd683cbfd8c00f12129a284deacc4cdefe58be7137541c047126c8" + "d49e2755ab181ab7e940b0c0");
144
144
  expect(result).toEqual(expected);
145
145
  });
146
- it('should pass test #6', function () {
146
+ it("should pass test #6", function () {
147
147
  var key, input, result, expected, cipher;
148
- key = hex2binary('fb029e3031323334');
149
- input = hex2binary('aaaa0300000008004500004e661a00008011be640a0001220af' + 'fffff00890089003a000080a601100001000000000000204543454a4548454346434' + '550464545494546464343414341434143414341414100002000011bd0b604');
148
+ key = hex2binary("fb029e3031323334");
149
+ input = hex2binary("aaaa0300000008004500004e661a00008011be640a0001220af" + "fffff00890089003a000080a601100001000000000000204543454a4548454346434" + "550464545494546464343414341434143414341414100002000011bd0b604");
150
150
  cipher = new _crypto.ARCFourCipher(key);
151
151
  result = cipher.encryptBlock(input);
152
- expected = hex2binary('f69c5806bd6ce84626bcbefb9474650aad1f7909b0f64d5f' + '58a503a258b7ed22eb0ea64930d3a056a55742fcce141d485f8aa836dea18df42c53' + '80805ad0c61a5d6f58f41040b24b7d1a693856ed0d4398e7aee3bf0e2a2ca8f7');
152
+ expected = hex2binary("f69c5806bd6ce84626bcbefb9474650aad1f7909b0f64d5f" + "58a503a258b7ed22eb0ea64930d3a056a55742fcce141d485f8aa836dea18df42c53" + "80805ad0c61a5d6f58f41040b24b7d1a693856ed0d4398e7aee3bf0e2a2ca8f7");
153
153
  expect(result).toEqual(expected);
154
154
  });
155
- it('should pass test #7', function () {
155
+ it("should pass test #7", function () {
156
156
  var key, input, result, expected, cipher;
157
- key = hex2binary('0123456789abcdef');
158
- input = hex2binary('123456789abcdef0123456789abcdef0123456789abcdef0123' + '45678');
157
+ key = hex2binary("0123456789abcdef");
158
+ input = hex2binary("123456789abcdef0123456789abcdef0123456789abcdef012345678");
159
159
  cipher = new _crypto.ARCFourCipher(key);
160
160
  result = cipher.encryptBlock(input);
161
- expected = hex2binary('66a0949f8af7d6891f7f832ba833c00c892ebe30143ce287' + '40011ecf');
161
+ expected = hex2binary("66a0949f8af7d6891f7f832ba833c00c892ebe30143ce28740011ecf");
162
162
  expect(result).toEqual(expected);
163
163
  });
164
164
  });
165
- describe('calculateSHA256', function () {
166
- it('should properly hash abc', function () {
165
+ describe("calculateSHA256", function () {
166
+ it("should properly hash abc", function () {
167
167
  var input, result, expected;
168
- input = (0, _util.stringToBytes)('abc');
168
+ input = (0, _util.stringToBytes)("abc");
169
169
  result = (0, _crypto.calculateSHA256)(input, 0, input.length);
170
- expected = hex2binary('BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9C' + 'B410FF61F20015AD');
170
+ expected = hex2binary("BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD");
171
171
  expect(result).toEqual(expected);
172
172
  });
173
- it('should properly hash a multiblock input', function () {
173
+ it("should properly hash a multiblock input", function () {
174
174
  var input, result, expected;
175
- input = (0, _util.stringToBytes)('abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmno' + 'mnopnopq');
175
+ input = (0, _util.stringToBytes)("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq");
176
176
  result = (0, _crypto.calculateSHA256)(input, 0, input.length);
177
- expected = hex2binary('248D6A61D20638B8E5C026930C3E6039A33CE45964FF2167' + 'F6ECEDD419DB06C1');
177
+ expected = hex2binary("248D6A61D20638B8E5C026930C3E6039A33CE45964FF2167F6ECEDD419DB06C1");
178
178
  expect(result).toEqual(expected);
179
179
  });
180
180
  });
181
- describe('calculateSHA384', function () {
182
- it('should properly hash abc', function () {
181
+ describe("calculateSHA384", function () {
182
+ it("should properly hash abc", function () {
183
183
  var input, result, expected;
184
- input = (0, _util.stringToBytes)('abc');
184
+ input = (0, _util.stringToBytes)("abc");
185
185
  result = (0, _crypto.calculateSHA384)(input, 0, input.length);
186
- expected = hex2binary('CB00753F45A35E8BB5A03D699AC65007272C32AB0EDED163' + '1A8B605A43FF5BED8086072BA1E7CC2358BAECA134C825A7');
186
+ expected = hex2binary("CB00753F45A35E8BB5A03D699AC65007272C32AB0EDED163" + "1A8B605A43FF5BED8086072BA1E7CC2358BAECA134C825A7");
187
187
  expect(result).toEqual(expected);
188
188
  });
189
- it('should properly hash a multiblock input', function () {
189
+ it("should properly hash a multiblock input", function () {
190
190
  var input, result, expected;
191
- input = (0, _util.stringToBytes)('abcdefghbcdefghicdefghijdefghijkefghijklfghijklm' + 'ghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrs' + 'mnopqrstnopqrstu');
191
+ input = (0, _util.stringToBytes)("abcdefghbcdefghicdefghijdefghijkefghijklfghijklm" + "ghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrs" + "mnopqrstnopqrstu");
192
192
  result = (0, _crypto.calculateSHA384)(input, 0, input.length);
193
- expected = hex2binary('09330C33F71147E83D192FC782CD1B4753111B173B3B05D2' + '2FA08086E3B0F712FCC7C71A557E2DB966C3E9FA91746039');
193
+ expected = hex2binary("09330C33F71147E83D192FC782CD1B4753111B173B3B05D2" + "2FA08086E3B0F712FCC7C71A557E2DB966C3E9FA91746039");
194
194
  expect(result).toEqual(expected);
195
195
  });
196
196
  });
197
- describe('calculateSHA512', function () {
198
- it('should properly hash abc', function () {
197
+ describe("calculateSHA512", function () {
198
+ it("should properly hash abc", function () {
199
199
  var input, result, expected;
200
- input = (0, _util.stringToBytes)('abc');
200
+ input = (0, _util.stringToBytes)("abc");
201
201
  result = (0, _crypto.calculateSHA512)(input, 0, input.length);
202
- expected = hex2binary('DDAF35A193617ABACC417349AE20413112E6FA4E89A97EA2' + '0A9EEEE64B55D39A2192992A274FC1A836BA3C23A3FEEBBD' + '454D4423643CE80E2A9AC94FA54CA49F');
202
+ expected = hex2binary("DDAF35A193617ABACC417349AE20413112E6FA4E89A97EA2" + "0A9EEEE64B55D39A2192992A274FC1A836BA3C23A3FEEBBD" + "454D4423643CE80E2A9AC94FA54CA49F");
203
203
  expect(result).toEqual(expected);
204
204
  });
205
- it('should properly hash a multiblock input', function () {
205
+ it("should properly hash a multiblock input", function () {
206
206
  var input, result, expected;
207
- input = (0, _util.stringToBytes)('abcdefghbcdefghicdefghijdefghijkefghijklfghijklm' + 'ghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrs' + 'mnopqrstnopqrstu');
207
+ input = (0, _util.stringToBytes)("abcdefghbcdefghicdefghijdefghijkefghijklfghijklm" + "ghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrs" + "mnopqrstnopqrstu");
208
208
  result = (0, _crypto.calculateSHA512)(input, 0, input.length);
209
- expected = hex2binary('8E959B75DAE313DA8CF4F72814FC143F8F7779C6EB9F7FA1' + '7299AEADB6889018501D289E4900F7E4331B99DEC4B5433A' + 'C7D329EEB6DD26545E96E55B874BE909');
209
+ expected = hex2binary("8E959B75DAE313DA8CF4F72814FC143F8F7779C6EB9F7FA1" + "7299AEADB6889018501D289E4900F7E4331B99DEC4B5433A" + "C7D329EEB6DD26545E96E55B874BE909");
210
210
  expect(result).toEqual(expected);
211
211
  });
212
212
  });
213
- describe('AES128', function () {
214
- describe('Encryption', function () {
215
- it('should be able to encrypt a block', function () {
213
+ describe("AES128", function () {
214
+ describe("Encryption", function () {
215
+ it("should be able to encrypt a block", function () {
216
216
  var input, key, result, expected, iv, cipher;
217
- input = hex2binary('00112233445566778899aabbccddeeff');
218
- key = hex2binary('000102030405060708090a0b0c0d0e0f');
219
- iv = hex2binary('00000000000000000000000000000000');
217
+ input = hex2binary("00112233445566778899aabbccddeeff");
218
+ key = hex2binary("000102030405060708090a0b0c0d0e0f");
219
+ iv = hex2binary("00000000000000000000000000000000");
220
220
  cipher = new _crypto.AES128Cipher(key);
221
221
  result = cipher.encrypt(input, iv);
222
- expected = hex2binary('69c4e0d86a7b0430d8cdb78070b4c55a');
222
+ expected = hex2binary("69c4e0d86a7b0430d8cdb78070b4c55a");
223
223
  expect(result).toEqual(expected);
224
224
  });
225
225
  });
226
- describe('Decryption', function () {
227
- it('should be able to decrypt a block with IV in stream', function () {
226
+ describe("Decryption", function () {
227
+ it("should be able to decrypt a block with IV in stream", function () {
228
228
  var input, key, result, expected, cipher;
229
- input = hex2binary('0000000000000000000000000000000069c4e0d86a7b0430d' + '8cdb78070b4c55a');
230
- key = hex2binary('000102030405060708090a0b0c0d0e0f');
229
+ input = hex2binary("0000000000000000000000000000000069c4e0d86a7b0430d" + "8cdb78070b4c55a");
230
+ key = hex2binary("000102030405060708090a0b0c0d0e0f");
231
231
  cipher = new _crypto.AES128Cipher(key);
232
232
  result = cipher.decryptBlock(input);
233
- expected = hex2binary('00112233445566778899aabbccddeeff');
233
+ expected = hex2binary("00112233445566778899aabbccddeeff");
234
234
  expect(result).toEqual(expected);
235
235
  });
236
236
  });
237
237
  });
238
- describe('AES256', function () {
239
- describe('Encryption', function () {
240
- it('should be able to encrypt a block', function () {
238
+ describe("AES256", function () {
239
+ describe("Encryption", function () {
240
+ it("should be able to encrypt a block", function () {
241
241
  var input, key, result, expected, iv, cipher;
242
- input = hex2binary('00112233445566778899aabbccddeeff');
243
- key = hex2binary('000102030405060708090a0b0c0d0e0f101112131415161718' + '191a1b1c1d1e1f');
244
- iv = hex2binary('00000000000000000000000000000000');
242
+ input = hex2binary("00112233445566778899aabbccddeeff");
243
+ key = hex2binary("000102030405060708090a0b0c0d0e0f101112131415161718" + "191a1b1c1d1e1f");
244
+ iv = hex2binary("00000000000000000000000000000000");
245
245
  cipher = new _crypto.AES256Cipher(key);
246
246
  result = cipher.encrypt(input, iv);
247
- expected = hex2binary('8ea2b7ca516745bfeafc49904b496089');
247
+ expected = hex2binary("8ea2b7ca516745bfeafc49904b496089");
248
248
  expect(result).toEqual(expected);
249
249
  });
250
250
  });
251
- describe('Decryption', function () {
252
- it('should be able to decrypt a block with specified iv', function () {
251
+ describe("Decryption", function () {
252
+ it("should be able to decrypt a block with specified iv", function () {
253
253
  var input, key, result, expected, cipher, iv;
254
- input = hex2binary('8ea2b7ca516745bfeafc49904b496089');
255
- key = hex2binary('000102030405060708090a0b0c0d0e0f101112131415161718' + '191a1b1c1d1e1f');
256
- iv = hex2binary('00000000000000000000000000000000');
254
+ input = hex2binary("8ea2b7ca516745bfeafc49904b496089");
255
+ key = hex2binary("000102030405060708090a0b0c0d0e0f101112131415161718" + "191a1b1c1d1e1f");
256
+ iv = hex2binary("00000000000000000000000000000000");
257
257
  cipher = new _crypto.AES256Cipher(key);
258
258
  result = cipher.decryptBlock(input, false, iv);
259
- expected = hex2binary('00112233445566778899aabbccddeeff');
259
+ expected = hex2binary("00112233445566778899aabbccddeeff");
260
260
  expect(result).toEqual(expected);
261
261
  });
262
- it('should be able to decrypt a block with IV in stream', function () {
262
+ it("should be able to decrypt a block with IV in stream", function () {
263
263
  var input, key, result, expected, cipher;
264
- input = hex2binary('000000000000000000000000000000008ea2b7ca516745bf' + 'eafc49904b496089');
265
- key = hex2binary('000102030405060708090a0b0c0d0e0f101112131415161718' + '191a1b1c1d1e1f');
264
+ input = hex2binary("000000000000000000000000000000008ea2b7ca516745bf" + "eafc49904b496089");
265
+ key = hex2binary("000102030405060708090a0b0c0d0e0f101112131415161718" + "191a1b1c1d1e1f");
266
266
  cipher = new _crypto.AES256Cipher(key);
267
267
  result = cipher.decryptBlock(input, false);
268
- expected = hex2binary('00112233445566778899aabbccddeeff');
268
+ expected = hex2binary("00112233445566778899aabbccddeeff");
269
269
  expect(result).toEqual(expected);
270
270
  });
271
271
  });
272
272
  });
273
- describe('PDF17Algorithm', function () {
274
- it('should correctly check a user key', function () {
273
+ describe("PDF17Algorithm", function () {
274
+ it("should correctly check a user key", function () {
275
275
  var password, userValidation, userPassword, alg, result;
276
276
  alg = new _crypto.PDF17();
277
277
  password = new Uint8Array([117, 115, 101, 114]);
@@ -280,7 +280,7 @@ describe('crypto', function () {
280
280
  result = alg.checkUserPassword(password, userValidation, userPassword);
281
281
  expect(result).toEqual(true);
282
282
  });
283
- it('should correctly check an owner key', function () {
283
+ it("should correctly check an owner key", function () {
284
284
  var password, ownerValidation, ownerPassword, alg, result, uBytes;
285
285
  alg = new _crypto.PDF17();
286
286
  password = new Uint8Array([111, 119, 110, 101, 114]);
@@ -290,7 +290,7 @@ describe('crypto', function () {
290
290
  result = alg.checkOwnerPassword(password, ownerValidation, uBytes, ownerPassword);
291
291
  expect(result).toEqual(true);
292
292
  });
293
- it('should generate a file encryption key from the user key', function () {
293
+ it("should generate a file encryption key from the user key", function () {
294
294
  var password, userKeySalt, expected, alg, result, userEncryption;
295
295
  alg = new _crypto.PDF17();
296
296
  password = new Uint8Array([117, 115, 101, 114]);
@@ -300,7 +300,7 @@ describe('crypto', function () {
300
300
  expected = new Uint8Array([63, 114, 136, 209, 87, 61, 12, 30, 249, 1, 186, 144, 254, 248, 163, 153, 151, 51, 133, 10, 80, 152, 206, 15, 72, 187, 231, 33, 224, 239, 13, 213]);
301
301
  expect(result).toEqual(expected);
302
302
  });
303
- it('should generate a file encryption key from the owner key', function () {
303
+ it("should generate a file encryption key from the owner key", function () {
304
304
  var password, ownerKeySalt, expected, alg, result, ownerEncryption;
305
305
  var uBytes;
306
306
  alg = new _crypto.PDF17();
@@ -313,8 +313,8 @@ describe('crypto', function () {
313
313
  expect(result).toEqual(expected);
314
314
  });
315
315
  });
316
- describe('PDF20Algorithm', function () {
317
- it('should correctly check a user key', function () {
316
+ describe("PDF20Algorithm", function () {
317
+ it("should correctly check a user key", function () {
318
318
  var password, userValidation, userPassword, alg, result;
319
319
  alg = new _crypto.PDF20();
320
320
  password = new Uint8Array([117, 115, 101, 114]);
@@ -323,7 +323,7 @@ describe('crypto', function () {
323
323
  result = alg.checkUserPassword(password, userValidation, userPassword);
324
324
  expect(result).toEqual(true);
325
325
  });
326
- it('should correctly check an owner key', function () {
326
+ it("should correctly check an owner key", function () {
327
327
  var password, ownerValidation, ownerPassword, alg, result, uBytes;
328
328
  alg = new _crypto.PDF20();
329
329
  password = new Uint8Array([111, 119, 110, 101, 114]);
@@ -333,7 +333,7 @@ describe('crypto', function () {
333
333
  result = alg.checkOwnerPassword(password, ownerValidation, uBytes, ownerPassword);
334
334
  expect(result).toEqual(true);
335
335
  });
336
- it('should generate a file encryption key from the user key', function () {
336
+ it("should generate a file encryption key from the user key", function () {
337
337
  var password, userKeySalt, expected, alg, result, userEncryption;
338
338
  alg = new _crypto.PDF20();
339
339
  password = new Uint8Array([117, 115, 101, 114]);
@@ -343,7 +343,7 @@ describe('crypto', function () {
343
343
  expected = new Uint8Array([42, 218, 213, 39, 73, 91, 72, 79, 67, 38, 248, 133, 18, 189, 61, 34, 107, 79, 29, 56, 59, 181, 213, 118, 113, 34, 65, 210, 87, 174, 22, 239]);
344
344
  expect(result).toEqual(expected);
345
345
  });
346
- it('should generate a file encryption key from the owner key', function () {
346
+ it("should generate a file encryption key from the owner key", function () {
347
347
  var password, ownerKeySalt, expected, alg, result, ownerEncryption;
348
348
  var uBytes;
349
349
  alg = new _crypto.PDF20();
@@ -357,7 +357,7 @@ describe('crypto', function () {
357
357
  });
358
358
  });
359
359
  });
360
- describe('CipherTransformFactory', function () {
360
+ describe("CipherTransformFactory", function () {
361
361
  function buildDict(map) {
362
362
  var dict = new _primitives.Dict();
363
363
 
@@ -371,9 +371,9 @@ describe('CipherTransformFactory', function () {
371
371
  function ensurePasswordCorrect(done, dict, fileId, password) {
372
372
  try {
373
373
  var factory = new _crypto.CipherTransformFactory(dict, fileId, password);
374
- expect('createCipherTransform' in factory).toEqual(true);
374
+ expect("createCipherTransform" in factory).toEqual(true);
375
375
  } catch (ex) {
376
- done.fail('Password should be accepted: ' + ex);
376
+ done.fail("Password should be accepted: " + ex);
377
377
  return;
378
378
  }
379
379
 
@@ -390,7 +390,7 @@ describe('CipherTransformFactory', function () {
390
390
  return;
391
391
  }
392
392
 
393
- done.fail('Password should be rejected.');
393
+ done.fail("Password should be rejected.");
394
394
  }
395
395
 
396
396
  function ensurePasswordIncorrect(done, dict, fileId, password) {
@@ -403,77 +403,77 @@ describe('CipherTransformFactory', function () {
403
403
  return;
404
404
  }
405
405
 
406
- done.fail('Password should be rejected.');
406
+ done.fail("Password should be rejected.");
407
407
  }
408
408
 
409
409
  var fileId1, fileId2, dict1, dict2;
410
410
  var aes256Dict, aes256IsoDict, aes256BlankDict, aes256IsoBlankDict;
411
411
  beforeAll(function (done) {
412
- fileId1 = unescape('%F6%C6%AF%17%F3rR%8DRM%9A%80%D1%EF%DF%18');
413
- fileId2 = unescape('%3CL_%3AD%96%AF@%9A%9D%B3%3Cx%1Cv%AC');
412
+ fileId1 = unescape("%F6%C6%AF%17%F3rR%8DRM%9A%80%D1%EF%DF%18");
413
+ fileId2 = unescape("%3CL_%3AD%96%AF@%9A%9D%B3%3Cx%1Cv%AC");
414
414
  dict1 = buildDict({
415
- Filter: _primitives.Name.get('Standard'),
415
+ Filter: _primitives.Name.get("Standard"),
416
416
  V: 2,
417
417
  Length: 128,
418
- O: unescape('%80%C3%04%96%91o%20sl%3A%E6%1B%13T%91%F2%0DV%12%E3%FF%5E%B' + 'B%E9VO%D8k%9A%CA%7C%5D'),
419
- U: unescape('j%0C%8D%3EY%19%00%BCjd%7D%91%BD%AA%00%18%00%00%00%00%00%00' + '%00%00%00%00%00%00%00%00%00%00'),
418
+ O: unescape("%80%C3%04%96%91o%20sl%3A%E6%1B%13T%91%F2%0DV%12%E3%FF%5E%B" + "B%E9VO%D8k%9A%CA%7C%5D"),
419
+ U: unescape("j%0C%8D%3EY%19%00%BCjd%7D%91%BD%AA%00%18%00%00%00%00%00%00" + "%00%00%00%00%00%00%00%00%00%00"),
420
420
  P: -1028,
421
421
  R: 3
422
422
  });
423
423
  dict2 = buildDict({
424
- Filter: _primitives.Name.get('Standard'),
424
+ Filter: _primitives.Name.get("Standard"),
425
425
  V: 4,
426
426
  Length: 128,
427
- O: unescape('sF%14v.y5%27%DB%97%0A5%22%B3%E1%D4%AD%BD%9B%3C%B4%A5%89u%1' + '5%B2Y%F1h%D9%E9%F4'),
428
- U: unescape('%93%04%89%A9%BF%8AE%A6%88%A2%DB%C2%A0%A8gn%00%00%00%00%00%' + '00%00%00%00%00%00%00%00%00%00%00'),
427
+ O: unescape("sF%14v.y5%27%DB%97%0A5%22%B3%E1%D4%AD%BD%9B%3C%B4%A5%89u%1" + "5%B2Y%F1h%D9%E9%F4"),
428
+ U: unescape("%93%04%89%A9%BF%8AE%A6%88%A2%DB%C2%A0%A8gn%00%00%00%00%00%" + "00%00%00%00%00%00%00%00%00%00%00"),
429
429
  P: -1084,
430
430
  R: 4
431
431
  });
432
432
  aes256Dict = buildDict({
433
- Filter: _primitives.Name.get('Standard'),
433
+ Filter: _primitives.Name.get("Standard"),
434
434
  V: 5,
435
435
  Length: 256,
436
- O: unescape('%3Cb%89%233e%C8%98%D2%B2%E2%E4%86%CD%A3%18%CC%7E%B1%24j2%2' + '4%7D%D2%AC%ABx%DEl%8Bs%F3vG%99%80%11e%3E%C8%F5%F2%0C%DA%7B' + '%18x'),
437
- U: unescape('%83%F2%8F%A0W%02%8A%86O%FD%BD%AD%E0I%90%F1%BEQ%C5%0F%F9i%9' + '1%97%0F%C2A%03%01%7E%BB%DDu%A9%04%20%9Fe%16%DC%A8%5E%D7%C0' + 'd%26%BC%28'),
438
- OE: unescape('%D5%CA%0E%BDnLF%BF%06%C3%0A%BE%9Dd%90U%08%3E%7B%B2%9C%E52' + '%28%E5%D86%DE%22%26j%DF'),
439
- UE: unescape('%23%96%C3%A9%F533%FF%9E%9E%21%F2%E7K%7D%BE%19%7E%ACr%C3%F' + '4%89%F5%EA%A5*J%3C%26%11%11'),
440
- Perms: unescape('%D8%FC%844%E5e%0DB%5D%7Ff%FD%3COMM'),
436
+ O: unescape("%3Cb%89%233e%C8%98%D2%B2%E2%E4%86%CD%A3%18%CC%7E%B1%24j2%2" + "4%7D%D2%AC%ABx%DEl%8Bs%F3vG%99%80%11e%3E%C8%F5%F2%0C%DA%7B" + "%18x"),
437
+ U: unescape("%83%F2%8F%A0W%02%8A%86O%FD%BD%AD%E0I%90%F1%BEQ%C5%0F%F9i%9" + "1%97%0F%C2A%03%01%7E%BB%DDu%A9%04%20%9Fe%16%DC%A8%5E%D7%C0" + "d%26%BC%28"),
438
+ OE: unescape("%D5%CA%0E%BDnLF%BF%06%C3%0A%BE%9Dd%90U%08%3E%7B%B2%9C%E52" + "%28%E5%D86%DE%22%26j%DF"),
439
+ UE: unescape("%23%96%C3%A9%F533%FF%9E%9E%21%F2%E7K%7D%BE%19%7E%ACr%C3%F" + "4%89%F5%EA%A5*J%3C%26%11%11"),
440
+ Perms: unescape("%D8%FC%844%E5e%0DB%5D%7Ff%FD%3COMM"),
441
441
  P: -1084,
442
442
  R: 5
443
443
  });
444
444
  aes256IsoDict = buildDict({
445
- Filter: _primitives.Name.get('Standard'),
445
+ Filter: _primitives.Name.get("Standard"),
446
446
  V: 5,
447
447
  Length: 256,
448
- O: unescape('X%E8%3E6%F5%1A%F5%D1%89%7B%DDH%C71%25%D9%1FJs%A7%7F%9E%B0M' + '-%A3W/%27Z%D9%8D%8E%E8%A9%D0%CA%D6%05%B9%1D%D0%B9.%0BL%87%' + '95'),
449
- U: unescape('%5E%E6%CDK%A6c%FAL%DB%80%11U9%11%21%A4%96.g%B0%A0%9C%BB%E9' + '%A6%DF%A3%FD%93%EB_%B8S%F5%92e%C6%F7%22%C6%BF%0B%10%5E%ED%' + 'D8%14%AF'),
450
- OE: unescape('%D1I%E0Mg%9B%C9%B5%BED%DF%14%3EZ8%D2%05%F0%B2%80%EE%7CD%F' + 'E%FD%F4%3El%D0%87%0A%FB'),
451
- UE: unescape('y%D0%02%B5%E6Y%9C%3C%FD%8F%D4%1CT%B4%C4%B1%AD%80%DDk.%14%' + '5E%BA%873_%18%14%DF%FE%24'),
452
- Perms: unescape('l%AD%0F%A0%EBM%86WM%3E%CB%B5%E0X%C97'),
448
+ O: unescape("X%E8%3E6%F5%1A%F5%D1%89%7B%DDH%C71%25%D9%1FJs%A7%7F%9E%B0M" + "-%A3W/%27Z%D9%8D%8E%E8%A9%D0%CA%D6%05%B9%1D%D0%B9.%0BL%87%" + "95"),
449
+ U: unescape("%5E%E6%CDK%A6c%FAL%DB%80%11U9%11%21%A4%96.g%B0%A0%9C%BB%E9" + "%A6%DF%A3%FD%93%EB_%B8S%F5%92e%C6%F7%22%C6%BF%0B%10%5E%ED%" + "D8%14%AF"),
450
+ OE: unescape("%D1I%E0Mg%9B%C9%B5%BED%DF%14%3EZ8%D2%05%F0%B2%80%EE%7CD%F" + "E%FD%F4%3El%D0%87%0A%FB"),
451
+ UE: unescape("y%D0%02%B5%E6Y%9C%3C%FD%8F%D4%1CT%B4%C4%B1%AD%80%DDk.%14%" + "5E%BA%873_%18%14%DF%FE%24"),
452
+ Perms: unescape("l%AD%0F%A0%EBM%86WM%3E%CB%B5%E0X%C97"),
453
453
  P: -1084,
454
454
  R: 6
455
455
  });
456
456
  aes256BlankDict = buildDict({
457
- Filter: _primitives.Name.get('Standard'),
457
+ Filter: _primitives.Name.get("Standard"),
458
458
  V: 5,
459
459
  Length: 256,
460
- O: unescape('%B8p%04%C3g%26%FCW%CCN%D4%16%A1%E8%950YZ%C9%9E%B1-%97%F3%F' + 'E%03%13%19ffZn%8F%F5%EB%EC%CC5sV%10e%CEl%B5%E9G%C1'),
461
- U: unescape('%83%D4zi%F1O0%961%12%CC%82%CB%CA%BF5y%FD%21%EB%E4%D1%B5%1D' + '%D6%FA%14%F3%BE%8Fqs%EF%88%DE%E2%E8%DC%F55%E4%B8%16%C8%14%' + '8De%1E'),
462
- OE: unescape('%8F%19%E8%D4%27%D5%07%CA%C6%A1%11%A6a%5Bt%F4%DF%0F%84%29%' + '0F%E4%EFF7%5B%5B%11%A0%8F%17e'),
463
- UE: unescape('%81%F5%5D%B0%28%81%E4%7F_%7C%8F%85b%A0%7E%10%D0%88lx%7B%7' + 'EJ%5E%912%B6d%12%27%05%F6'),
464
- Perms: unescape('%86%1562%0D%AE%A2%FB%5D%3B%22%3Dq%12%B2H'),
460
+ O: unescape("%B8p%04%C3g%26%FCW%CCN%D4%16%A1%E8%950YZ%C9%9E%B1-%97%F3%F" + "E%03%13%19ffZn%8F%F5%EB%EC%CC5sV%10e%CEl%B5%E9G%C1"),
461
+ U: unescape("%83%D4zi%F1O0%961%12%CC%82%CB%CA%BF5y%FD%21%EB%E4%D1%B5%1D" + "%D6%FA%14%F3%BE%8Fqs%EF%88%DE%E2%E8%DC%F55%E4%B8%16%C8%14%" + "8De%1E"),
462
+ OE: unescape("%8F%19%E8%D4%27%D5%07%CA%C6%A1%11%A6a%5Bt%F4%DF%0F%84%29%" + "0F%E4%EFF7%5B%5B%11%A0%8F%17e"),
463
+ UE: unescape("%81%F5%5D%B0%28%81%E4%7F_%7C%8F%85b%A0%7E%10%D0%88lx%7B%7" + "EJ%5E%912%B6d%12%27%05%F6"),
464
+ Perms: unescape("%86%1562%0D%AE%A2%FB%5D%3B%22%3Dq%12%B2H"),
465
465
  P: -1084,
466
466
  R: 5
467
467
  });
468
468
  aes256IsoBlankDict = buildDict({
469
- Filter: _primitives.Name.get('Standard'),
469
+ Filter: _primitives.Name.get("Standard"),
470
470
  V: 5,
471
471
  Length: 256,
472
- O: unescape('%F7%DB%99U%A6M%ACk%AF%CF%D7AFw%E9%C1%91%CBDgI%23R%CF%0C%15' + 'r%D74%0D%CE%E9%91@%E4%98QF%BF%88%7Ej%DE%AD%8F%F4@%C1'),
473
- U: unescape('%1A%A9%DC%918%83%93k%29%5B%117%B16%DB%E8%8E%FE%28%E5%89%D4' + '%0E%AD%12%3B%7DN_6fez%8BG%18%05YOh%7DZH%A3Z%87%17*'),
474
- OE: unescape('%A4a%88%20h%1B%7F%CD%D5%CAc%D8R%83%E5%D6%1C%D2%98%07%984%' + 'BA%AF%1B%B4%7FQ%F8%1EU%7D'),
475
- UE: unescape('%A0%0AZU%27%1D%27%2C%0B%FE%0E%A2L%F9b%5E%A1%B9%D6v7b%B26%' + 'A9N%99%F1%A4Deq'),
476
- Perms: unescape('%03%F2i%07%0D%C3%F9%F2%28%80%B7%F5%DD%D1c%EB'),
472
+ O: unescape("%F7%DB%99U%A6M%ACk%AF%CF%D7AFw%E9%C1%91%CBDgI%23R%CF%0C%15" + "r%D74%0D%CE%E9%91@%E4%98QF%BF%88%7Ej%DE%AD%8F%F4@%C1"),
473
+ U: unescape("%1A%A9%DC%918%83%93k%29%5B%117%B16%DB%E8%8E%FE%28%E5%89%D4" + "%0E%AD%12%3B%7DN_6fez%8BG%18%05YOh%7DZH%A3Z%87%17*"),
474
+ OE: unescape("%A4a%88%20h%1B%7F%CD%D5%CAc%D8R%83%E5%D6%1C%D2%98%07%984%" + "BA%AF%1B%B4%7FQ%F8%1EU%7D"),
475
+ UE: unescape("%A0%0AZU%27%1D%27%2C%0B%FE%0E%A2L%F9b%5E%A1%B9%D6v7b%B26%" + "A9N%99%F1%A4Deq"),
476
+ Perms: unescape("%03%F2i%07%0D%C3%F9%F2%28%80%B7%F5%DD%D1c%EB"),
477
477
  P: -1084,
478
478
  R: 6
479
479
  });
@@ -483,54 +483,54 @@ describe('CipherTransformFactory', function () {
483
483
  fileId1 = fileId2 = dict1 = dict2 = null;
484
484
  aes256Dict = aes256IsoDict = aes256BlankDict = aes256IsoBlankDict = null;
485
485
  });
486
- describe('#ctor', function () {
487
- describe('AES256 Revision 5', function () {
488
- it('should accept user password', function (done) {
489
- ensurePasswordCorrect(done, aes256Dict, fileId1, 'user');
486
+ describe("#ctor", function () {
487
+ describe("AES256 Revision 5", function () {
488
+ it("should accept user password", function (done) {
489
+ ensurePasswordCorrect(done, aes256Dict, fileId1, "user");
490
490
  });
491
- it('should accept owner password', function (done) {
492
- ensurePasswordCorrect(done, aes256Dict, fileId1, 'owner');
491
+ it("should accept owner password", function (done) {
492
+ ensurePasswordCorrect(done, aes256Dict, fileId1, "owner");
493
493
  });
494
- it('should not accept blank password', function (done) {
494
+ it("should not accept blank password", function (done) {
495
495
  ensurePasswordNeeded(done, aes256Dict, fileId1);
496
496
  });
497
- it('should not accept wrong password', function (done) {
498
- ensurePasswordIncorrect(done, aes256Dict, fileId1, 'wrong');
497
+ it("should not accept wrong password", function (done) {
498
+ ensurePasswordIncorrect(done, aes256Dict, fileId1, "wrong");
499
499
  });
500
- it('should accept blank password', function (done) {
500
+ it("should accept blank password", function (done) {
501
501
  ensurePasswordCorrect(done, aes256BlankDict, fileId1);
502
502
  });
503
503
  });
504
- describe('AES256 Revision 6', function () {
505
- it('should accept user password', function (done) {
506
- ensurePasswordCorrect(done, aes256IsoDict, fileId1, 'user');
504
+ describe("AES256 Revision 6", function () {
505
+ it("should accept user password", function (done) {
506
+ ensurePasswordCorrect(done, aes256IsoDict, fileId1, "user");
507
507
  });
508
- it('should accept owner password', function (done) {
509
- ensurePasswordCorrect(done, aes256IsoDict, fileId1, 'owner');
508
+ it("should accept owner password", function (done) {
509
+ ensurePasswordCorrect(done, aes256IsoDict, fileId1, "owner");
510
510
  });
511
- it('should not accept blank password', function (done) {
511
+ it("should not accept blank password", function (done) {
512
512
  ensurePasswordNeeded(done, aes256IsoDict, fileId1);
513
513
  });
514
- it('should not accept wrong password', function (done) {
515
- ensurePasswordIncorrect(done, aes256IsoDict, fileId1, 'wrong');
514
+ it("should not accept wrong password", function (done) {
515
+ ensurePasswordIncorrect(done, aes256IsoDict, fileId1, "wrong");
516
516
  });
517
- it('should accept blank password', function (done) {
517
+ it("should accept blank password", function (done) {
518
518
  ensurePasswordCorrect(done, aes256IsoBlankDict, fileId1);
519
519
  });
520
520
  });
521
- it('should accept user password', function (done) {
522
- ensurePasswordCorrect(done, dict1, fileId1, '123456');
521
+ it("should accept user password", function (done) {
522
+ ensurePasswordCorrect(done, dict1, fileId1, "123456");
523
523
  });
524
- it('should accept owner password', function (done) {
525
- ensurePasswordCorrect(done, dict1, fileId1, '654321');
524
+ it("should accept owner password", function (done) {
525
+ ensurePasswordCorrect(done, dict1, fileId1, "654321");
526
526
  });
527
- it('should not accept blank password', function (done) {
527
+ it("should not accept blank password", function (done) {
528
528
  ensurePasswordNeeded(done, dict1, fileId1);
529
529
  });
530
- it('should not accept wrong password', function (done) {
531
- ensurePasswordIncorrect(done, dict1, fileId1, 'wrong');
530
+ it("should not accept wrong password", function (done) {
531
+ ensurePasswordIncorrect(done, dict1, fileId1, "wrong");
532
532
  });
533
- it('should accept blank password', function (done) {
533
+ it("should accept blank password", function (done) {
534
534
  ensurePasswordCorrect(done, dict2, fileId2);
535
535
  });
536
536
  });