@dereekb/nestjs 13.10.8 → 13.10.9
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/discord/package.json +4 -4
- package/eslint/package.json +1 -1
- package/index.cjs.js +789 -0
- package/index.esm.js +791 -3
- package/mailgun/package.json +6 -6
- package/openai/package.json +6 -6
- package/package.json +3 -3
- package/src/lib/util/index.d.ts +1 -0
- package/src/lib/util/pdf/index.d.ts +1 -0
- package/src/lib/util/pdf/pdf.encryption.d.ts +48 -0
- package/stripe/package.json +6 -6
- package/typeform/package.json +6 -6
- package/vapiai/package.json +6 -6
package/index.cjs.js
CHANGED
|
@@ -1307,6 +1307,794 @@ var ENCRYPTED_FIELD_KEY_LENGTH = 32;
|
|
|
1307
1307
|
return result;
|
|
1308
1308
|
}
|
|
1309
1309
|
|
|
1310
|
+
function _array_like_to_array(arr, len) {
|
|
1311
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1312
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1313
|
+
return arr2;
|
|
1314
|
+
}
|
|
1315
|
+
function _array_with_holes(arr) {
|
|
1316
|
+
if (Array.isArray(arr)) return arr;
|
|
1317
|
+
}
|
|
1318
|
+
function _iterable_to_array_limit(arr, i) {
|
|
1319
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1320
|
+
if (_i == null) return;
|
|
1321
|
+
var _arr = [];
|
|
1322
|
+
var _n = true;
|
|
1323
|
+
var _d = false;
|
|
1324
|
+
var _s, _e;
|
|
1325
|
+
try {
|
|
1326
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
1327
|
+
_arr.push(_s.value);
|
|
1328
|
+
if (i && _arr.length === i) break;
|
|
1329
|
+
}
|
|
1330
|
+
} catch (err) {
|
|
1331
|
+
_d = true;
|
|
1332
|
+
_e = err;
|
|
1333
|
+
} finally{
|
|
1334
|
+
try {
|
|
1335
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
1336
|
+
} finally{
|
|
1337
|
+
if (_d) throw _e;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
return _arr;
|
|
1341
|
+
}
|
|
1342
|
+
function _non_iterable_rest() {
|
|
1343
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1344
|
+
}
|
|
1345
|
+
function _sliced_to_array(arr, i) {
|
|
1346
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
1347
|
+
}
|
|
1348
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
1349
|
+
if (!o) return;
|
|
1350
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
1351
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1352
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1353
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1354
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* 32-byte password padding string defined by ISO 32000 §7.6.3.3 (Algorithm 2).
|
|
1358
|
+
* Used to pad short or empty user/owner passwords for the standard security handler.
|
|
1359
|
+
*/ var PDF_PASSWORD_PADDING = Buffer.from([
|
|
1360
|
+
0x28,
|
|
1361
|
+
0xbf,
|
|
1362
|
+
0x4e,
|
|
1363
|
+
0x5e,
|
|
1364
|
+
0x4e,
|
|
1365
|
+
0x75,
|
|
1366
|
+
0x8a,
|
|
1367
|
+
0x41,
|
|
1368
|
+
0x64,
|
|
1369
|
+
0x00,
|
|
1370
|
+
0x4e,
|
|
1371
|
+
0x56,
|
|
1372
|
+
0xff,
|
|
1373
|
+
0xfa,
|
|
1374
|
+
0x01,
|
|
1375
|
+
0x08,
|
|
1376
|
+
0x2e,
|
|
1377
|
+
0x2e,
|
|
1378
|
+
0x00,
|
|
1379
|
+
0xb6,
|
|
1380
|
+
0xd0,
|
|
1381
|
+
0x68,
|
|
1382
|
+
0x3e,
|
|
1383
|
+
0x80,
|
|
1384
|
+
0x2f,
|
|
1385
|
+
0x0c,
|
|
1386
|
+
0xa9,
|
|
1387
|
+
0xfe,
|
|
1388
|
+
0x64,
|
|
1389
|
+
0x53,
|
|
1390
|
+
0x69,
|
|
1391
|
+
0x7a
|
|
1392
|
+
]);
|
|
1393
|
+
/**
|
|
1394
|
+
* Detects whether a PDF is unencrypted, write-protected (openable without a password
|
|
1395
|
+
* but restricted from editing/printing), or fully encrypted (requires a password to open).
|
|
1396
|
+
*
|
|
1397
|
+
* Implements the user-password validation algorithms from ISO 32000-1 §7.6.3 (R≤4) and
|
|
1398
|
+
* ISO 32000-2 §7.6.4.4 (R=5/6) using only the empty password. If the empty password
|
|
1399
|
+
* validates successfully, the PDF is openable by anyone and only its modify/print/copy
|
|
1400
|
+
* permissions are restricted; otherwise a non-empty user password is required.
|
|
1401
|
+
*
|
|
1402
|
+
* Supported security handlers:
|
|
1403
|
+
* - Standard security handler, R=2,3,4 (RC4-40, RC4-128, AES-128 with crypt filters).
|
|
1404
|
+
* - Standard security handler, R=5 (AES-256, deprecated Adobe extension).
|
|
1405
|
+
* - Standard security handler, R=6 (AES-256, ISO 32000-2 / PDF 2.0).
|
|
1406
|
+
*
|
|
1407
|
+
* Unrecognised security handlers (e.g. PubSec, custom handlers) return
|
|
1408
|
+
* `unknown_encrypted` so callers can choose whether to treat them as fully encrypted.
|
|
1409
|
+
*
|
|
1410
|
+
* Lives in `@dereekb/nestjs` (rather than `@dereekb/util`) because it uses Node's
|
|
1411
|
+
* built-in `node:crypto` module, which isn't available in the browser.
|
|
1412
|
+
*
|
|
1413
|
+
* @example
|
|
1414
|
+
* ```ts
|
|
1415
|
+
* const status = detectPdfEncryption(buffer);
|
|
1416
|
+
*
|
|
1417
|
+
* if (status === 'fully_encrypted') {
|
|
1418
|
+
* throw new Error('PDF requires a password to open.');
|
|
1419
|
+
* }
|
|
1420
|
+
* if (status === 'write_protected_only') {
|
|
1421
|
+
* // Safe to read, but not to mutate without the owner password.
|
|
1422
|
+
* }
|
|
1423
|
+
* ```
|
|
1424
|
+
*
|
|
1425
|
+
* @param buffer - PDF file contents.
|
|
1426
|
+
* @returns The encryption status of the PDF.
|
|
1427
|
+
*/ function detectPdfEncryption(buffer) {
|
|
1428
|
+
var result = 'unknown_encrypted';
|
|
1429
|
+
var encryptIndex = findEncryptKeywordIndex(buffer);
|
|
1430
|
+
if (encryptIndex < 0) {
|
|
1431
|
+
result = 'none';
|
|
1432
|
+
} else {
|
|
1433
|
+
var dict = extractEncryptionDictionary(buffer, encryptIndex);
|
|
1434
|
+
var info = dict ? parseEncryptionInfo(dict) : null;
|
|
1435
|
+
if ((info === null || info === void 0 ? void 0 : info.filter) === 'Standard') {
|
|
1436
|
+
var opensWithEmptyPassword = checkStandardHandlerEmptyPassword(info, buffer);
|
|
1437
|
+
if (opensWithEmptyPassword !== null) {
|
|
1438
|
+
result = opensWithEmptyPassword ? 'write_protected_only' : 'fully_encrypted';
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
return result;
|
|
1443
|
+
}
|
|
1444
|
+
function checkStandardHandlerEmptyPassword(info, buffer) {
|
|
1445
|
+
var result = null;
|
|
1446
|
+
if (info.R >= 2 && info.R <= 4) {
|
|
1447
|
+
var fileId = extractFirstFileId(buffer);
|
|
1448
|
+
if (fileId && info.O.length >= 32 && info.U.length >= 32) {
|
|
1449
|
+
result = validateEmptyPasswordR2to4(info, fileId);
|
|
1450
|
+
}
|
|
1451
|
+
} else if (info.R === 5 && info.U.length >= 48) {
|
|
1452
|
+
result = validateEmptyPasswordR5(info);
|
|
1453
|
+
} else if (info.R === 6 && info.U.length >= 48) {
|
|
1454
|
+
result = validateEmptyPasswordR6(info);
|
|
1455
|
+
}
|
|
1456
|
+
return result;
|
|
1457
|
+
}
|
|
1458
|
+
function isPdfWhitespaceByte(b) {
|
|
1459
|
+
return b === 0x00 || b === 0x09 || b === 0x0a || b === 0x0c || b === 0x0d || b === 0x20;
|
|
1460
|
+
}
|
|
1461
|
+
function isPdfDelimiterByte(b) {
|
|
1462
|
+
return b === 0x28 || b === 0x29 || b === 0x3c || b === 0x3e || b === 0x5b || b === 0x5d || b === 0x7b || b === 0x7d || b === 0x2f || b === 0x25;
|
|
1463
|
+
}
|
|
1464
|
+
function isPdfWhitespaceOrDelimiter(b) {
|
|
1465
|
+
return isPdfWhitespaceByte(b) || isPdfDelimiterByte(b);
|
|
1466
|
+
}
|
|
1467
|
+
function skipPdfWhitespaceAndComments(buffer, start) {
|
|
1468
|
+
var i = start;
|
|
1469
|
+
while(i < buffer.length){
|
|
1470
|
+
var b = buffer[i];
|
|
1471
|
+
if (isPdfWhitespaceByte(b)) {
|
|
1472
|
+
i++;
|
|
1473
|
+
} else if (b === 0x25 /* % */ ) {
|
|
1474
|
+
while(i < buffer.length && buffer[i] !== 0x0a && buffer[i] !== 0x0d)i++;
|
|
1475
|
+
} else {
|
|
1476
|
+
break;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
return i;
|
|
1480
|
+
}
|
|
1481
|
+
function skipPdfLiteralString(buffer, start) {
|
|
1482
|
+
var depth = 1;
|
|
1483
|
+
var i = start + 1;
|
|
1484
|
+
while(i < buffer.length && depth > 0){
|
|
1485
|
+
var b = buffer[i];
|
|
1486
|
+
if (b === 0x5c /* \ */ ) {
|
|
1487
|
+
i += 2;
|
|
1488
|
+
} else if (b === 0x28 /* ( */ ) {
|
|
1489
|
+
depth++;
|
|
1490
|
+
i++;
|
|
1491
|
+
} else if (b === 0x29 /* ) */ ) {
|
|
1492
|
+
depth--;
|
|
1493
|
+
i++;
|
|
1494
|
+
} else {
|
|
1495
|
+
i++;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
return i;
|
|
1499
|
+
}
|
|
1500
|
+
function skipPdfHexString(buffer, start) {
|
|
1501
|
+
var i = start + 1;
|
|
1502
|
+
while(i < buffer.length && buffer[i] !== 0x3e /* > */ )i++;
|
|
1503
|
+
return i < buffer.length ? i + 1 : i;
|
|
1504
|
+
}
|
|
1505
|
+
function findDictEnd(buffer, start) {
|
|
1506
|
+
var depth = 1;
|
|
1507
|
+
var i = start;
|
|
1508
|
+
var endIndex = -1;
|
|
1509
|
+
while(i < buffer.length && endIndex < 0){
|
|
1510
|
+
var b = buffer[i];
|
|
1511
|
+
if (b === 0x3c && buffer[i + 1] === 0x3c) {
|
|
1512
|
+
depth++;
|
|
1513
|
+
i += 2;
|
|
1514
|
+
} else if (b === 0x3e && buffer[i + 1] === 0x3e) {
|
|
1515
|
+
depth--;
|
|
1516
|
+
if (depth === 0) {
|
|
1517
|
+
endIndex = i;
|
|
1518
|
+
} else {
|
|
1519
|
+
i += 2;
|
|
1520
|
+
}
|
|
1521
|
+
} else if (b === 0x28) {
|
|
1522
|
+
i = skipPdfLiteralString(buffer, i);
|
|
1523
|
+
} else if (b === 0x3c) {
|
|
1524
|
+
i = skipPdfHexString(buffer, i);
|
|
1525
|
+
} else if (b === 0x25) {
|
|
1526
|
+
while(i < buffer.length && buffer[i] !== 0x0a && buffer[i] !== 0x0d)i++;
|
|
1527
|
+
} else {
|
|
1528
|
+
i++;
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
return endIndex >= 0 ? endIndex : i;
|
|
1532
|
+
}
|
|
1533
|
+
function decodePdfLiteralString(content) {
|
|
1534
|
+
var out = [];
|
|
1535
|
+
var i = 0;
|
|
1536
|
+
while(i < content.length){
|
|
1537
|
+
var b = content[i];
|
|
1538
|
+
if (b !== 0x5c /* \ */ ) {
|
|
1539
|
+
out.push(b);
|
|
1540
|
+
i++;
|
|
1541
|
+
continue;
|
|
1542
|
+
}
|
|
1543
|
+
i++;
|
|
1544
|
+
if (i >= content.length) break;
|
|
1545
|
+
var c = content[i];
|
|
1546
|
+
if (c >= 0x30 && c <= 0x37) {
|
|
1547
|
+
var oct = c - 0x30;
|
|
1548
|
+
i++;
|
|
1549
|
+
if (i < content.length && content[i] >= 0x30 && content[i] <= 0x37) {
|
|
1550
|
+
oct = oct * 8 + (content[i] - 0x30);
|
|
1551
|
+
i++;
|
|
1552
|
+
if (i < content.length && content[i] >= 0x30 && content[i] <= 0x37) {
|
|
1553
|
+
oct = oct * 8 + (content[i] - 0x30);
|
|
1554
|
+
i++;
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
out.push(oct & 0xff);
|
|
1558
|
+
} else if (c === 0x6e /* n */ ) {
|
|
1559
|
+
out.push(0x0a);
|
|
1560
|
+
i++;
|
|
1561
|
+
} else if (c === 0x72 /* r */ ) {
|
|
1562
|
+
out.push(0x0d);
|
|
1563
|
+
i++;
|
|
1564
|
+
} else if (c === 0x74 /* t */ ) {
|
|
1565
|
+
out.push(0x09);
|
|
1566
|
+
i++;
|
|
1567
|
+
} else if (c === 0x62 /* b */ ) {
|
|
1568
|
+
out.push(0x08);
|
|
1569
|
+
i++;
|
|
1570
|
+
} else if (c === 0x66 /* f */ ) {
|
|
1571
|
+
out.push(0x0c);
|
|
1572
|
+
i++;
|
|
1573
|
+
} else if (c === 0x0a) {
|
|
1574
|
+
i++;
|
|
1575
|
+
} else if (c === 0x0d) {
|
|
1576
|
+
i++;
|
|
1577
|
+
if (i < content.length && content[i] === 0x0a) i++;
|
|
1578
|
+
} else {
|
|
1579
|
+
out.push(c);
|
|
1580
|
+
i++;
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
return Buffer.from(out);
|
|
1584
|
+
}
|
|
1585
|
+
function decodePdfHexString(content) {
|
|
1586
|
+
var hex = [];
|
|
1587
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1588
|
+
try {
|
|
1589
|
+
for(var _iterator = content[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1590
|
+
var b = _step.value;
|
|
1591
|
+
if (isPdfWhitespaceByte(b)) continue;
|
|
1592
|
+
if (b >= 0x30 && b <= 0x39 || b >= 0x41 && b <= 0x46 || b >= 0x61 && b <= 0x66) hex.push(b);
|
|
1593
|
+
}
|
|
1594
|
+
} catch (err) {
|
|
1595
|
+
_didIteratorError = true;
|
|
1596
|
+
_iteratorError = err;
|
|
1597
|
+
} finally{
|
|
1598
|
+
try {
|
|
1599
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1600
|
+
_iterator.return();
|
|
1601
|
+
}
|
|
1602
|
+
} finally{
|
|
1603
|
+
if (_didIteratorError) {
|
|
1604
|
+
throw _iteratorError;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
if (hex.length % 2 === 1) hex.push(0x30);
|
|
1609
|
+
var out = Buffer.alloc(hex.length / 2);
|
|
1610
|
+
for(var i = 0; i < out.length; i++){
|
|
1611
|
+
out[i] = parseInt(String.fromCharCode(hex[i * 2], hex[i * 2 + 1]), 16);
|
|
1612
|
+
}
|
|
1613
|
+
return out;
|
|
1614
|
+
}
|
|
1615
|
+
function readPdfNumber(buffer, start) {
|
|
1616
|
+
var i = start;
|
|
1617
|
+
while(i < buffer.length && !isPdfWhitespaceOrDelimiter(buffer[i]))i++;
|
|
1618
|
+
var result = null;
|
|
1619
|
+
if (i > start) {
|
|
1620
|
+
var text = buffer.toString('latin1', start, i);
|
|
1621
|
+
var value = Number(text);
|
|
1622
|
+
if (!Number.isNaN(value)) {
|
|
1623
|
+
result = {
|
|
1624
|
+
value: value,
|
|
1625
|
+
end: i
|
|
1626
|
+
};
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
return result;
|
|
1630
|
+
}
|
|
1631
|
+
function parsePdfDict(buffer, dictStart) {
|
|
1632
|
+
// dictStart is the byte after `<<`.
|
|
1633
|
+
var entries = new Map();
|
|
1634
|
+
var i = skipPdfWhitespaceAndComments(buffer, dictStart);
|
|
1635
|
+
var result = null;
|
|
1636
|
+
var aborted = false;
|
|
1637
|
+
while(i < buffer.length && !aborted && result === null){
|
|
1638
|
+
if (buffer[i] === 0x3e && buffer[i + 1] === 0x3e) {
|
|
1639
|
+
result = {
|
|
1640
|
+
entries: entries,
|
|
1641
|
+
end: i + 2
|
|
1642
|
+
};
|
|
1643
|
+
} else if (buffer[i] !== 0x2f /* / */ ) {
|
|
1644
|
+
aborted = true;
|
|
1645
|
+
} else {
|
|
1646
|
+
var nameStart = i + 1;
|
|
1647
|
+
var nameEnd = nameStart;
|
|
1648
|
+
while(nameEnd < buffer.length && !isPdfWhitespaceOrDelimiter(buffer[nameEnd]))nameEnd++;
|
|
1649
|
+
var name = buffer.toString('latin1', nameStart, nameEnd);
|
|
1650
|
+
i = skipPdfWhitespaceAndComments(buffer, nameEnd);
|
|
1651
|
+
if (i >= buffer.length) {
|
|
1652
|
+
aborted = true;
|
|
1653
|
+
} else {
|
|
1654
|
+
var valueResult = readPdfValue(buffer, i);
|
|
1655
|
+
if (!valueResult) {
|
|
1656
|
+
aborted = true;
|
|
1657
|
+
} else {
|
|
1658
|
+
entries.set(name, valueResult.entry);
|
|
1659
|
+
i = skipPdfWhitespaceAndComments(buffer, valueResult.end);
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
return result;
|
|
1665
|
+
}
|
|
1666
|
+
function readPdfValue(buffer, start) {
|
|
1667
|
+
var b = buffer[start];
|
|
1668
|
+
var result;
|
|
1669
|
+
if (b === 0x3c && buffer[start + 1] === 0x3c) {
|
|
1670
|
+
result = readPdfDictValue(buffer, start);
|
|
1671
|
+
} else if (b === 0x3c) {
|
|
1672
|
+
result = readPdfHexStringValue(buffer, start);
|
|
1673
|
+
} else if (b === 0x28) {
|
|
1674
|
+
result = readPdfLiteralStringValue(buffer, start);
|
|
1675
|
+
} else if (b === 0x5b /* [ */ ) {
|
|
1676
|
+
result = readPdfArrayValue(buffer, start);
|
|
1677
|
+
} else if (b === 0x2f /* / */ ) {
|
|
1678
|
+
result = readPdfNameValue(buffer, start);
|
|
1679
|
+
} else {
|
|
1680
|
+
result = readPdfTokenOrRefValue(buffer, start);
|
|
1681
|
+
}
|
|
1682
|
+
return result;
|
|
1683
|
+
}
|
|
1684
|
+
function readPdfDictValue(buffer, start) {
|
|
1685
|
+
var dictEnd = findDictEnd(buffer, start + 2);
|
|
1686
|
+
var end = dictEnd < buffer.length && buffer[dictEnd] === 0x3e && buffer[dictEnd + 1] === 0x3e ? dictEnd + 2 : dictEnd;
|
|
1687
|
+
return {
|
|
1688
|
+
entry: {
|
|
1689
|
+
type: 'dict',
|
|
1690
|
+
raw: buffer.subarray(start, end)
|
|
1691
|
+
},
|
|
1692
|
+
end: end
|
|
1693
|
+
};
|
|
1694
|
+
}
|
|
1695
|
+
function readPdfHexStringValue(buffer, start) {
|
|
1696
|
+
var end = skipPdfHexString(buffer, start);
|
|
1697
|
+
return {
|
|
1698
|
+
entry: {
|
|
1699
|
+
type: 'string',
|
|
1700
|
+
raw: decodePdfHexString(buffer.subarray(start + 1, end - 1))
|
|
1701
|
+
},
|
|
1702
|
+
end: end
|
|
1703
|
+
};
|
|
1704
|
+
}
|
|
1705
|
+
function readPdfLiteralStringValue(buffer, start) {
|
|
1706
|
+
var end = skipPdfLiteralString(buffer, start);
|
|
1707
|
+
return {
|
|
1708
|
+
entry: {
|
|
1709
|
+
type: 'string',
|
|
1710
|
+
raw: decodePdfLiteralString(buffer.subarray(start + 1, end - 1))
|
|
1711
|
+
},
|
|
1712
|
+
end: end
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
function readPdfArrayValue(buffer, start) {
|
|
1716
|
+
var depth = 1;
|
|
1717
|
+
var i = start + 1;
|
|
1718
|
+
while(i < buffer.length && depth > 0){
|
|
1719
|
+
var c = buffer[i];
|
|
1720
|
+
if (c === 0x5b) {
|
|
1721
|
+
depth++;
|
|
1722
|
+
i++;
|
|
1723
|
+
} else if (c === 0x5d) {
|
|
1724
|
+
depth--;
|
|
1725
|
+
i++;
|
|
1726
|
+
} else if (c === 0x28) {
|
|
1727
|
+
i = skipPdfLiteralString(buffer, i);
|
|
1728
|
+
} else if (c === 0x3c && buffer[i + 1] === 0x3c) {
|
|
1729
|
+
var e = findDictEnd(buffer, i + 2);
|
|
1730
|
+
i = e < buffer.length && buffer[e] === 0x3e && buffer[e + 1] === 0x3e ? e + 2 : e;
|
|
1731
|
+
} else if (c === 0x3c) {
|
|
1732
|
+
i = skipPdfHexString(buffer, i);
|
|
1733
|
+
} else if (c === 0x25) {
|
|
1734
|
+
while(i < buffer.length && buffer[i] !== 0x0a && buffer[i] !== 0x0d)i++;
|
|
1735
|
+
} else {
|
|
1736
|
+
i++;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
return {
|
|
1740
|
+
entry: {
|
|
1741
|
+
type: 'array',
|
|
1742
|
+
raw: buffer.subarray(start, i)
|
|
1743
|
+
},
|
|
1744
|
+
end: i
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1747
|
+
function readPdfNameValue(buffer, start) {
|
|
1748
|
+
var i = start + 1;
|
|
1749
|
+
while(i < buffer.length && !isPdfWhitespaceOrDelimiter(buffer[i]))i++;
|
|
1750
|
+
return {
|
|
1751
|
+
entry: {
|
|
1752
|
+
type: 'name',
|
|
1753
|
+
raw: buffer.subarray(start + 1, i)
|
|
1754
|
+
},
|
|
1755
|
+
end: i
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1758
|
+
function readPdfTokenOrRefValue(buffer, start) {
|
|
1759
|
+
// Number, boolean, null, or indirect reference like `12 0 R`.
|
|
1760
|
+
var i = start;
|
|
1761
|
+
while(i < buffer.length && !isPdfWhitespaceOrDelimiter(buffer[i]))i++;
|
|
1762
|
+
var tokenEnd = i;
|
|
1763
|
+
var token = buffer.toString('latin1', start, tokenEnd);
|
|
1764
|
+
var referenceEnd = readIndirectReferenceEnd(buffer, tokenEnd);
|
|
1765
|
+
var result;
|
|
1766
|
+
if (referenceEnd !== null) {
|
|
1767
|
+
result = {
|
|
1768
|
+
entry: {
|
|
1769
|
+
type: 'ref',
|
|
1770
|
+
raw: buffer.subarray(start, referenceEnd)
|
|
1771
|
+
},
|
|
1772
|
+
end: referenceEnd
|
|
1773
|
+
};
|
|
1774
|
+
} else if (token === 'true' || token === 'false') {
|
|
1775
|
+
result = {
|
|
1776
|
+
entry: {
|
|
1777
|
+
type: 'boolean',
|
|
1778
|
+
raw: buffer.subarray(start, tokenEnd)
|
|
1779
|
+
},
|
|
1780
|
+
end: tokenEnd
|
|
1781
|
+
};
|
|
1782
|
+
} else if (token === 'null') {
|
|
1783
|
+
result = {
|
|
1784
|
+
entry: {
|
|
1785
|
+
type: 'null',
|
|
1786
|
+
raw: buffer.subarray(start, tokenEnd)
|
|
1787
|
+
},
|
|
1788
|
+
end: tokenEnd
|
|
1789
|
+
};
|
|
1790
|
+
} else {
|
|
1791
|
+
result = {
|
|
1792
|
+
entry: {
|
|
1793
|
+
type: 'number',
|
|
1794
|
+
raw: buffer.subarray(start, tokenEnd)
|
|
1795
|
+
},
|
|
1796
|
+
end: tokenEnd
|
|
1797
|
+
};
|
|
1798
|
+
}
|
|
1799
|
+
return result;
|
|
1800
|
+
}
|
|
1801
|
+
function readIndirectReferenceEnd(buffer, tokenEnd) {
|
|
1802
|
+
// Probe ahead for `GEN R` after a leading object number to detect `N G R`.
|
|
1803
|
+
var result = null;
|
|
1804
|
+
var probe = skipPdfWhitespaceAndComments(buffer, tokenEnd);
|
|
1805
|
+
if (probe < buffer.length) {
|
|
1806
|
+
var c = buffer[probe];
|
|
1807
|
+
if (c >= 0x30 && c <= 0x39) {
|
|
1808
|
+
var secondEnd = probe;
|
|
1809
|
+
while(secondEnd < buffer.length && !isPdfWhitespaceOrDelimiter(buffer[secondEnd]))secondEnd++;
|
|
1810
|
+
var probe2 = skipPdfWhitespaceAndComments(buffer, secondEnd);
|
|
1811
|
+
if (probe2 < buffer.length && buffer[probe2] === 0x52 /* R */ && (probe2 + 1 === buffer.length || isPdfWhitespaceOrDelimiter(buffer[probe2 + 1]))) {
|
|
1812
|
+
result = probe2 + 1;
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
return result;
|
|
1817
|
+
}
|
|
1818
|
+
function findEncryptKeywordIndex(buffer) {
|
|
1819
|
+
var marker = util.PDF_ENCRYPT_MARKER;
|
|
1820
|
+
var last = -1;
|
|
1821
|
+
var pos = 0;
|
|
1822
|
+
while(true){
|
|
1823
|
+
var found = buffer.indexOf(marker, pos);
|
|
1824
|
+
if (found < 0) break;
|
|
1825
|
+
var next = buffer[found + marker.length];
|
|
1826
|
+
// Avoid matching `/EncryptMetadata` (a different name).
|
|
1827
|
+
var isAlpha = next >= 0x41 && next <= 0x5a || next >= 0x61 && next <= 0x7a;
|
|
1828
|
+
if (!isAlpha) last = found;
|
|
1829
|
+
pos = found + marker.length;
|
|
1830
|
+
}
|
|
1831
|
+
return last;
|
|
1832
|
+
}
|
|
1833
|
+
function extractEncryptionDictionary(buffer, encryptIndex) {
|
|
1834
|
+
var result = null;
|
|
1835
|
+
var i = encryptIndex + util.PDF_ENCRYPT_MARKER.length;
|
|
1836
|
+
i = skipPdfWhitespaceAndComments(buffer, i);
|
|
1837
|
+
if (i < buffer.length) {
|
|
1838
|
+
if (buffer[i] === 0x3c && buffer[i + 1] === 0x3c) {
|
|
1839
|
+
// Inline dictionary.
|
|
1840
|
+
var dictEnd = findDictEnd(buffer, i + 2);
|
|
1841
|
+
result = buffer.subarray(i, dictEnd + 2);
|
|
1842
|
+
} else {
|
|
1843
|
+
// Indirect reference: `N G R`.
|
|
1844
|
+
result = resolveIndirectEncryptionDictionary(buffer, i);
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
return result;
|
|
1848
|
+
}
|
|
1849
|
+
function resolveIndirectEncryptionDictionary(buffer, start) {
|
|
1850
|
+
var result = null;
|
|
1851
|
+
var numResult = readPdfNumber(buffer, start);
|
|
1852
|
+
if (numResult) {
|
|
1853
|
+
var afterFirst = skipPdfWhitespaceAndComments(buffer, numResult.end);
|
|
1854
|
+
var genResult = readPdfNumber(buffer, afterFirst);
|
|
1855
|
+
if (genResult) {
|
|
1856
|
+
var afterSecond = skipPdfWhitespaceAndComments(buffer, genResult.end);
|
|
1857
|
+
if (buffer[afterSecond] === 0x52 /* R */ ) {
|
|
1858
|
+
var objStart = findIndirectObjectStart(buffer, numResult.value, genResult.value);
|
|
1859
|
+
if (objStart >= 0) {
|
|
1860
|
+
var dictStart = buffer.indexOf('<<', objStart);
|
|
1861
|
+
if (dictStart >= 0) {
|
|
1862
|
+
var dictEnd = findDictEnd(buffer, dictStart + 2);
|
|
1863
|
+
result = buffer.subarray(dictStart, dictEnd + 2);
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
return result;
|
|
1870
|
+
}
|
|
1871
|
+
function findIndirectObjectStart(buffer, objNum, objGen) {
|
|
1872
|
+
var text = buffer.toString('latin1');
|
|
1873
|
+
var re = new RegExp("(?:^|[\\r\\n\\s])".concat(objNum, "\\s+").concat(objGen, "\\s+obj\\b"));
|
|
1874
|
+
var match = re.exec(text);
|
|
1875
|
+
return match ? match.index + match[0].length : -1;
|
|
1876
|
+
}
|
|
1877
|
+
function parseEncryptionInfo(dictBuffer) {
|
|
1878
|
+
// `dictBuffer` is the full `<< ... >>`; pass the body to parsePdfDict.
|
|
1879
|
+
var result = null;
|
|
1880
|
+
var isDict = dictBuffer.length >= 4 && dictBuffer[0] === 0x3c && dictBuffer[1] === 0x3c;
|
|
1881
|
+
var parsed = isDict ? parsePdfDict(dictBuffer, 2) : null;
|
|
1882
|
+
if (parsed) {
|
|
1883
|
+
var _readNameValue, _readNumberValue, _readNumberValue1, _readNumberValue2, _readStringValue, _readStringValue1, _readNumberValue3, _readBooleanValue;
|
|
1884
|
+
var entries = parsed.entries;
|
|
1885
|
+
var filter = (_readNameValue = readNameValue(entries.get('Filter'))) !== null && _readNameValue !== void 0 ? _readNameValue : '';
|
|
1886
|
+
var V = (_readNumberValue = readNumberValue(entries.get('V'))) !== null && _readNumberValue !== void 0 ? _readNumberValue : 0;
|
|
1887
|
+
var R = (_readNumberValue1 = readNumberValue(entries.get('R'))) !== null && _readNumberValue1 !== void 0 ? _readNumberValue1 : 0;
|
|
1888
|
+
var Length = (_readNumberValue2 = readNumberValue(entries.get('Length'))) !== null && _readNumberValue2 !== void 0 ? _readNumberValue2 : V >= 5 ? 256 : 40;
|
|
1889
|
+
var O = (_readStringValue = readStringValue(entries.get('O'))) !== null && _readStringValue !== void 0 ? _readStringValue : Buffer.alloc(0);
|
|
1890
|
+
var U = (_readStringValue1 = readStringValue(entries.get('U'))) !== null && _readStringValue1 !== void 0 ? _readStringValue1 : Buffer.alloc(0);
|
|
1891
|
+
var P = (_readNumberValue3 = readNumberValue(entries.get('P'))) !== null && _readNumberValue3 !== void 0 ? _readNumberValue3 : 0;
|
|
1892
|
+
var encryptMetadataEntry = entries.get('EncryptMetadata');
|
|
1893
|
+
var encryptMetadata = encryptMetadataEntry ? (_readBooleanValue = readBooleanValue(encryptMetadataEntry)) !== null && _readBooleanValue !== void 0 ? _readBooleanValue : true : true;
|
|
1894
|
+
if (R !== 0 && V !== 0) {
|
|
1895
|
+
result = {
|
|
1896
|
+
filter: filter,
|
|
1897
|
+
V: V,
|
|
1898
|
+
R: R,
|
|
1899
|
+
Length: Length,
|
|
1900
|
+
O: O,
|
|
1901
|
+
U: U,
|
|
1902
|
+
P: P,
|
|
1903
|
+
encryptMetadata: encryptMetadata
|
|
1904
|
+
};
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
return result;
|
|
1908
|
+
}
|
|
1909
|
+
function readNumberValue(entry) {
|
|
1910
|
+
var result = null;
|
|
1911
|
+
if ((entry === null || entry === void 0 ? void 0 : entry.type) === 'number') {
|
|
1912
|
+
var value = Number(entry.raw.toString('latin1'));
|
|
1913
|
+
if (!Number.isNaN(value)) {
|
|
1914
|
+
result = value;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
return result;
|
|
1918
|
+
}
|
|
1919
|
+
function readNameValue(entry) {
|
|
1920
|
+
return (entry === null || entry === void 0 ? void 0 : entry.type) === 'name' ? entry.raw.toString('latin1') : null;
|
|
1921
|
+
}
|
|
1922
|
+
function readStringValue(entry) {
|
|
1923
|
+
return (entry === null || entry === void 0 ? void 0 : entry.type) === 'string' ? entry.raw : null;
|
|
1924
|
+
}
|
|
1925
|
+
function readBooleanValue(entry) {
|
|
1926
|
+
return entry.type === 'boolean' ? entry.raw.toString('latin1') === 'true' : null;
|
|
1927
|
+
}
|
|
1928
|
+
function extractFirstFileId(buffer) {
|
|
1929
|
+
// The /ID array lives in the trailer or the cross-reference stream dictionary.
|
|
1930
|
+
// Walk the buffer right-to-left to find the most recent /ID array.
|
|
1931
|
+
var result = null;
|
|
1932
|
+
var pos = buffer.length;
|
|
1933
|
+
var done = false;
|
|
1934
|
+
while(pos > 0 && !done){
|
|
1935
|
+
var found = buffer.lastIndexOf('/ID', pos);
|
|
1936
|
+
if (found < 0) {
|
|
1937
|
+
done = true;
|
|
1938
|
+
} else {
|
|
1939
|
+
var after = found + 3;
|
|
1940
|
+
var isExactName = after >= buffer.length || isPdfWhitespaceOrDelimiter(buffer[after]);
|
|
1941
|
+
if (isExactName) {
|
|
1942
|
+
var i = skipPdfWhitespaceAndComments(buffer, after);
|
|
1943
|
+
if (buffer[i] === 0x5b /* [ */ ) {
|
|
1944
|
+
i = skipPdfWhitespaceAndComments(buffer, i + 1);
|
|
1945
|
+
var valueResult = readPdfValue(buffer, i);
|
|
1946
|
+
if ((valueResult === null || valueResult === void 0 ? void 0 : valueResult.entry.type) === 'string') {
|
|
1947
|
+
result = valueResult.entry.raw;
|
|
1948
|
+
done = true;
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
if (!done) {
|
|
1953
|
+
pos = found - 1;
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
return result;
|
|
1958
|
+
}
|
|
1959
|
+
// MARK: Standard security handler — empty-password validation
|
|
1960
|
+
function rc4(key, data) {
|
|
1961
|
+
var S = new Uint8Array(256);
|
|
1962
|
+
for(var i = 0; i < 256; i++)S[i] = i;
|
|
1963
|
+
var j = 0;
|
|
1964
|
+
for(var i1 = 0; i1 < 256; i1++){
|
|
1965
|
+
j = j + S[i1] + key[i1 % key.length] & 0xff;
|
|
1966
|
+
var t = S[i1];
|
|
1967
|
+
S[i1] = S[j];
|
|
1968
|
+
S[j] = t;
|
|
1969
|
+
}
|
|
1970
|
+
var out = Buffer.alloc(data.length);
|
|
1971
|
+
var ii = 0;
|
|
1972
|
+
var jj = 0;
|
|
1973
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1974
|
+
try {
|
|
1975
|
+
for(var _iterator = data.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1976
|
+
var _step_value = _sliced_to_array(_step.value, 2), n = _step_value[0], byte = _step_value[1];
|
|
1977
|
+
ii = ii + 1 & 0xff;
|
|
1978
|
+
jj = jj + S[ii] & 0xff;
|
|
1979
|
+
var t1 = S[ii];
|
|
1980
|
+
S[ii] = S[jj];
|
|
1981
|
+
S[jj] = t1;
|
|
1982
|
+
out[n] = byte ^ S[S[ii] + S[jj] & 0xff];
|
|
1983
|
+
}
|
|
1984
|
+
} catch (err) {
|
|
1985
|
+
_didIteratorError = true;
|
|
1986
|
+
_iteratorError = err;
|
|
1987
|
+
} finally{
|
|
1988
|
+
try {
|
|
1989
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1990
|
+
_iterator.return();
|
|
1991
|
+
}
|
|
1992
|
+
} finally{
|
|
1993
|
+
if (_didIteratorError) {
|
|
1994
|
+
throw _iteratorError;
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
return out;
|
|
1999
|
+
}
|
|
2000
|
+
function computeFileEncryptionKeyR2to4(info, password, fileId) {
|
|
2001
|
+
var padded = Buffer.alloc(32);
|
|
2002
|
+
password.copy(padded, 0, 0, Math.min(password.length, 32));
|
|
2003
|
+
if (password.length < 32) PDF_PASSWORD_PADDING.copy(padded, password.length, 0, 32 - password.length);
|
|
2004
|
+
var md5 = node_crypto.createHash('md5');
|
|
2005
|
+
md5.update(padded);
|
|
2006
|
+
md5.update(info.O);
|
|
2007
|
+
var pBytes = Buffer.alloc(4);
|
|
2008
|
+
pBytes.writeInt32LE(info.P | 0, 0);
|
|
2009
|
+
md5.update(pBytes);
|
|
2010
|
+
md5.update(fileId);
|
|
2011
|
+
if (info.R >= 4 && !info.encryptMetadata) md5.update(Buffer.from([
|
|
2012
|
+
0xff,
|
|
2013
|
+
0xff,
|
|
2014
|
+
0xff,
|
|
2015
|
+
0xff
|
|
2016
|
+
]));
|
|
2017
|
+
var key = md5.digest();
|
|
2018
|
+
var keyBytes = Math.min(Math.floor(info.Length / 8), key.length);
|
|
2019
|
+
if (info.R >= 3) {
|
|
2020
|
+
for(var i = 0; i < 50; i++){
|
|
2021
|
+
key = node_crypto.createHash('md5').update(key.subarray(0, keyBytes)).digest();
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
return key.subarray(0, keyBytes);
|
|
2025
|
+
}
|
|
2026
|
+
function validateEmptyPasswordR2to4(info, fileId) {
|
|
2027
|
+
var password = Buffer.alloc(0);
|
|
2028
|
+
var key = computeFileEncryptionKeyR2to4(info, password, fileId);
|
|
2029
|
+
var matches;
|
|
2030
|
+
if (info.R === 2) {
|
|
2031
|
+
var expected = rc4(key, PDF_PASSWORD_PADDING);
|
|
2032
|
+
matches = constantTimeEquals(expected, info.U.subarray(0, 32));
|
|
2033
|
+
} else {
|
|
2034
|
+
var computed = node_crypto.createHash('md5').update(PDF_PASSWORD_PADDING).update(fileId).digest();
|
|
2035
|
+
computed = rc4(key, computed);
|
|
2036
|
+
for(var i = 1; i <= 19; i++){
|
|
2037
|
+
var xorKey = Buffer.alloc(key.length);
|
|
2038
|
+
for(var j = 0; j < key.length; j++)xorKey[j] = key[j] ^ i;
|
|
2039
|
+
computed = rc4(xorKey, computed);
|
|
2040
|
+
}
|
|
2041
|
+
matches = constantTimeEquals(computed, info.U.subarray(0, 16));
|
|
2042
|
+
}
|
|
2043
|
+
return matches;
|
|
2044
|
+
}
|
|
2045
|
+
function validateEmptyPasswordR5(info) {
|
|
2046
|
+
var validationSalt = info.U.subarray(32, 40);
|
|
2047
|
+
var computed = node_crypto.createHash('sha256').update(validationSalt).digest();
|
|
2048
|
+
return constantTimeEquals(computed, info.U.subarray(0, 32));
|
|
2049
|
+
}
|
|
2050
|
+
function validateEmptyPasswordR6(info) {
|
|
2051
|
+
var validationSalt = info.U.subarray(32, 40);
|
|
2052
|
+
var password = Buffer.alloc(0);
|
|
2053
|
+
var computed = pdfAlgorithm2B(Buffer.concat([
|
|
2054
|
+
password,
|
|
2055
|
+
validationSalt
|
|
2056
|
+
]), password, Buffer.alloc(0));
|
|
2057
|
+
return constantTimeEquals(computed, info.U.subarray(0, 32));
|
|
2058
|
+
}
|
|
2059
|
+
function pdfAlgorithm2B(input, password, userKey) {
|
|
2060
|
+
var K = node_crypto.createHash('sha256').update(input).digest();
|
|
2061
|
+
var round = 0;
|
|
2062
|
+
var lastE = Buffer.alloc(0);
|
|
2063
|
+
while(true){
|
|
2064
|
+
var part = Buffer.concat([
|
|
2065
|
+
password,
|
|
2066
|
+
K,
|
|
2067
|
+
userKey
|
|
2068
|
+
]);
|
|
2069
|
+
var K1 = Buffer.alloc(part.length * 64);
|
|
2070
|
+
for(var i = 0; i < 64; i++)part.copy(K1, i * part.length);
|
|
2071
|
+
var cipher = node_crypto.createCipheriv('aes-128-cbc', K.subarray(0, 16), K.subarray(16, 32));
|
|
2072
|
+
cipher.setAutoPadding(false);
|
|
2073
|
+
var E = Buffer.concat([
|
|
2074
|
+
cipher.update(K1),
|
|
2075
|
+
cipher.final()
|
|
2076
|
+
]);
|
|
2077
|
+
lastE = E;
|
|
2078
|
+
var n = 0;
|
|
2079
|
+
for(var i1 = 0; i1 < 16; i1++)n = (n * 256 + E[i1]) % 3;
|
|
2080
|
+
if (n === 0) K = node_crypto.createHash('sha256').update(E).digest();
|
|
2081
|
+
else if (n === 1) K = node_crypto.createHash('sha384').update(E).digest();
|
|
2082
|
+
else K = node_crypto.createHash('sha512').update(E).digest();
|
|
2083
|
+
round++;
|
|
2084
|
+
if (round >= 64 && lastE[lastE.length - 1] <= round - 32) break;
|
|
2085
|
+
}
|
|
2086
|
+
return K.subarray(0, 32);
|
|
2087
|
+
}
|
|
2088
|
+
function constantTimeEquals(a, b) {
|
|
2089
|
+
var result = false;
|
|
2090
|
+
if (a.length === b.length) {
|
|
2091
|
+
var diff = 0;
|
|
2092
|
+
for(var i = 0; i < a.length; i++)diff |= a[i] ^ b[i];
|
|
2093
|
+
result = diff === 0;
|
|
2094
|
+
}
|
|
2095
|
+
return result;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
1310
2098
|
exports.AppModuleWithWebhooksEnabled = AppModuleWithWebhooksEnabled;
|
|
1311
2099
|
exports.CLIENT_WEB_APP_URL_ENV_VAR = CLIENT_WEB_APP_URL_ENV_VAR;
|
|
1312
2100
|
exports.ClientAppServiceConfig = ClientAppServiceConfig;
|
|
@@ -1327,6 +2115,7 @@ exports.consumeWebhooksWithRawBodyMiddleware = consumeWebhooksWithRawBodyMiddlew
|
|
|
1327
2115
|
exports.createAES256GCMEncryption = createAES256GCMEncryption;
|
|
1328
2116
|
exports.createAesStringEncryptionProvider = createAesStringEncryptionProvider;
|
|
1329
2117
|
exports.decryptValue = decryptValue;
|
|
2118
|
+
exports.detectPdfEncryption = detectPdfEncryption;
|
|
1330
2119
|
exports.encryptValue = encryptValue;
|
|
1331
2120
|
exports.injectionTokensFromProviders = injectionTokensFromProviders;
|
|
1332
2121
|
exports.isLocalhost = isLocalhost;
|