pptx-viewer-core 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project are documented here.
4
4
  This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
5
5
  by [git-cliff](https://git-cliff.org); do not edit it by hand.
6
6
 
7
+ ## [1.3.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-core@1.3.0) - 2026-07-11
8
+
9
+ ### Other
10
+
11
+ - Reconcile with origin/main before push (by @ChristopherVR) ([0ecd3d9](https://github.com/ChristopherVR/pptx-viewer/commit/0ecd3d935f97c78e8b0a62bebc8bf610c42414ab))
12
+
7
13
  ## [1.2.8](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-core@1.2.8) - 2026-07-10
8
14
 
9
15
  ## [1.2.7](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-core@1.2.7) - 2026-07-09
package/dist/cli/index.js CHANGED
Binary file
Binary file
package/dist/index.d.mts CHANGED
@@ -2958,7 +2958,7 @@ declare function hasNonTrivialOverride(override: Record<string, string> | null |
2958
2958
  * (which indicates an encrypted OOXML package) rather than a normal ZIP.
2959
2959
  *
2960
2960
  * Encrypted OOXML files are wrapped in OLE structured storage format.
2961
- * The OLE magic bytes are: D0 CF 11 E0 A1 1B 1A E1
2961
+ * The OLE magic bytes are: D0 CF 11 E0 A1 B1 1A E1
2962
2962
  * Normal PPTX files start with ZIP magic: 50 4B (PK)
2963
2963
  */
2964
2964
  type FileFormatDetection = {
package/dist/index.d.ts CHANGED
@@ -2958,7 +2958,7 @@ declare function hasNonTrivialOverride(override: Record<string, string> | null |
2958
2958
  * (which indicates an encrypted OOXML package) rather than a normal ZIP.
2959
2959
  *
2960
2960
  * Encrypted OOXML files are wrapped in OLE structured storage format.
2961
- * The OLE magic bytes are: D0 CF 11 E0 A1 1B 1A E1
2961
+ * The OLE magic bytes are: D0 CF 11 E0 A1 B1 1A E1
2962
2962
  * Normal PPTX files start with ZIP magic: 50 4B (PK)
2963
2963
  */
2964
2964
  type FileFormatDetection = {
package/dist/index.js CHANGED
@@ -12801,7 +12801,7 @@ function stripParentDirSegments(path) {
12801
12801
  }
12802
12802
 
12803
12803
  // src/core/utils/ole2-parser-types.ts
12804
- var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
12804
+ var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 177, 26, 225]);
12805
12805
  var ENDOFCHAIN = 4294967294;
12806
12806
  var FREESECT = 4294967295;
12807
12807
  var FATSECT = 4294967293;
@@ -19333,7 +19333,7 @@ function resolveLayoutCategory(layoutType) {
19333
19333
  }
19334
19334
 
19335
19335
  // src/core/utils/encryption-detection.ts
19336
- var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
19336
+ var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 177, 26, 225]);
19337
19337
  var ZIP_MAGIC = new Uint8Array([80, 75]);
19338
19338
  function detectFileFormat(data) {
19339
19339
  if (data.byteLength < 8) {
@@ -20027,15 +20027,9 @@ async function verifyAgilePassword(info, password) {
20027
20027
  pke.keyBits,
20028
20028
  pke.hashSize
20029
20029
  );
20030
- const iv1 = generateIV(
20031
- pke.hashAlgorithm,
20032
- pke.saltValue,
20033
- BLOCK_KEYS.verifierHashInput,
20034
- pke.blockSize
20035
- );
20036
20030
  const verifierHashInput = await aesCbcDecryptRaw(
20037
20031
  verifierInputKey,
20038
- await iv1,
20032
+ pke.saltValue,
20039
20033
  pke.encryptedVerifierHashInput
20040
20034
  );
20041
20035
  const verifierHashKey = await deriveAgileKey(
@@ -20047,15 +20041,9 @@ async function verifyAgilePassword(info, password) {
20047
20041
  pke.keyBits,
20048
20042
  pke.hashSize
20049
20043
  );
20050
- const iv2 = generateIV(
20051
- pke.hashAlgorithm,
20052
- pke.saltValue,
20053
- BLOCK_KEYS.verifierHashValue,
20054
- pke.blockSize
20055
- );
20056
20044
  const verifierHashValue = await aesCbcDecryptRaw(
20057
20045
  verifierHashKey,
20058
- await iv2,
20046
+ pke.saltValue,
20059
20047
  pke.encryptedVerifierHashValue
20060
20048
  );
20061
20049
  const computedHash = await hash(pke.hashAlgorithm, verifierHashInput.subarray(0, pke.saltSize));
@@ -20080,13 +20068,7 @@ async function verifyAgilePassword(info, password) {
20080
20068
  pke.keyBits,
20081
20069
  pke.hashSize
20082
20070
  );
20083
- const iv3 = await generateIV(
20084
- pke.hashAlgorithm,
20085
- pke.saltValue,
20086
- BLOCK_KEYS.encryptedKeyValue,
20087
- pke.blockSize
20088
- );
20089
- const decryptedKey = await aesCbcDecryptRaw(encKeyKey, iv3, pke.encryptedKeyValue);
20071
+ const decryptedKey = await aesCbcDecryptRaw(encKeyKey, pke.saltValue, pke.encryptedKeyValue);
20090
20072
  return decryptedKey.subarray(0, info.keyData.keyBits / 8);
20091
20073
  }
20092
20074
  async function verifyStandardPassword(info, password) {
@@ -20139,8 +20121,7 @@ async function verifyAgileDataIntegrity(info, key, encryptedPackage) {
20139
20121
  info.dataIntegrity.encryptedHmacValue
20140
20122
  );
20141
20123
  const expectedHmac = decryptedHmacValue.subarray(0, keyData.hashSize);
20142
- const encryptedContent = encryptedPackage.subarray(8);
20143
- const computedHmac = await hmac(keyData.hashAlgorithm, hmacKey, encryptedContent);
20124
+ const computedHmac = await hmac(keyData.hashAlgorithm, hmacKey, encryptedPackage);
20144
20125
  let match = true;
20145
20126
  if (computedHmac.length < keyData.hashSize) {
20146
20127
  match = false;
@@ -20294,14 +20275,13 @@ async function encryptPptx(pptxBuffer, password, options) {
20294
20275
  keyBits,
20295
20276
  hashSize
20296
20277
  );
20297
- const iv1 = await generateIV(hashAlgorithm, pkeSalt, BLOCK_KEYS.verifierHashInput, blockSize);
20298
20278
  const paddedVerifierInput = new Uint8Array(
20299
20279
  Math.ceil(verifierHashInput.length / blockSize) * blockSize
20300
20280
  );
20301
20281
  paddedVerifierInput.set(verifierHashInput);
20302
20282
  const encryptedVerifierHashInput = await aesCbcEncryptNoPad(
20303
20283
  verifierInputKey,
20304
- iv1,
20284
+ pkeSalt,
20305
20285
  paddedVerifierInput
20306
20286
  );
20307
20287
  const verifierHashKey = await deriveAgileKey(
@@ -20313,12 +20293,11 @@ async function encryptPptx(pptxBuffer, password, options) {
20313
20293
  keyBits,
20314
20294
  hashSize
20315
20295
  );
20316
- const iv2 = await generateIV(hashAlgorithm, pkeSalt, BLOCK_KEYS.verifierHashValue, blockSize);
20317
20296
  const paddedVerifierHash = new Uint8Array(Math.ceil(verifierHash.length / blockSize) * blockSize);
20318
20297
  paddedVerifierHash.set(verifierHash);
20319
20298
  const encryptedVerifierHashValue = await aesCbcEncryptNoPad(
20320
20299
  verifierHashKey,
20321
- iv2,
20300
+ pkeSalt,
20322
20301
  paddedVerifierHash
20323
20302
  );
20324
20303
  const encKeyKey = await deriveAgileKey(
@@ -20330,10 +20309,9 @@ async function encryptPptx(pptxBuffer, password, options) {
20330
20309
  keyBits,
20331
20310
  hashSize
20332
20311
  );
20333
- const iv3 = await generateIV(hashAlgorithm, pkeSalt, BLOCK_KEYS.encryptedKeyValue, blockSize);
20334
20312
  const paddedDocumentKey = new Uint8Array(Math.ceil(documentKey.length / blockSize) * blockSize);
20335
20313
  paddedDocumentKey.set(documentKey);
20336
- const encryptedKeyValue = await aesCbcEncryptNoPad(encKeyKey, iv3, paddedDocumentKey);
20314
+ const encryptedKeyValue = await aesCbcEncryptNoPad(encKeyKey, pkeSalt, paddedDocumentKey);
20337
20315
  const encInfo = {
20338
20316
  keyData: {
20339
20317
  saltSize: 16,
@@ -20369,7 +20347,7 @@ async function encryptPptx(pptxBuffer, password, options) {
20369
20347
  const encryptedPackage = await encryptAgilePackage(packageData, documentKey, encInfo);
20370
20348
  const hmacKeyRandom = new Uint8Array(hashSize);
20371
20349
  crypto2.getRandomValues(hmacKeyRandom);
20372
- const hmacValue = await hmac(hashAlgorithm, hmacKeyRandom, encryptedPackage.subarray(8));
20350
+ const hmacValue = await hmac(hashAlgorithm, hmacKeyRandom, encryptedPackage);
20373
20351
  const hmacKeyIV = await generateIV(
20374
20352
  hashAlgorithm,
20375
20353
  keyDataSalt,
package/dist/index.mjs CHANGED
@@ -12796,7 +12796,7 @@ function stripParentDirSegments(path) {
12796
12796
  }
12797
12797
 
12798
12798
  // src/core/utils/ole2-parser-types.ts
12799
- var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
12799
+ var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 177, 26, 225]);
12800
12800
  var ENDOFCHAIN = 4294967294;
12801
12801
  var FREESECT = 4294967295;
12802
12802
  var FATSECT = 4294967293;
@@ -19328,7 +19328,7 @@ function resolveLayoutCategory(layoutType) {
19328
19328
  }
19329
19329
 
19330
19330
  // src/core/utils/encryption-detection.ts
19331
- var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
19331
+ var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 177, 26, 225]);
19332
19332
  var ZIP_MAGIC = new Uint8Array([80, 75]);
19333
19333
  function detectFileFormat(data) {
19334
19334
  if (data.byteLength < 8) {
@@ -20022,15 +20022,9 @@ async function verifyAgilePassword(info, password) {
20022
20022
  pke.keyBits,
20023
20023
  pke.hashSize
20024
20024
  );
20025
- const iv1 = generateIV(
20026
- pke.hashAlgorithm,
20027
- pke.saltValue,
20028
- BLOCK_KEYS.verifierHashInput,
20029
- pke.blockSize
20030
- );
20031
20025
  const verifierHashInput = await aesCbcDecryptRaw(
20032
20026
  verifierInputKey,
20033
- await iv1,
20027
+ pke.saltValue,
20034
20028
  pke.encryptedVerifierHashInput
20035
20029
  );
20036
20030
  const verifierHashKey = await deriveAgileKey(
@@ -20042,15 +20036,9 @@ async function verifyAgilePassword(info, password) {
20042
20036
  pke.keyBits,
20043
20037
  pke.hashSize
20044
20038
  );
20045
- const iv2 = generateIV(
20046
- pke.hashAlgorithm,
20047
- pke.saltValue,
20048
- BLOCK_KEYS.verifierHashValue,
20049
- pke.blockSize
20050
- );
20051
20039
  const verifierHashValue = await aesCbcDecryptRaw(
20052
20040
  verifierHashKey,
20053
- await iv2,
20041
+ pke.saltValue,
20054
20042
  pke.encryptedVerifierHashValue
20055
20043
  );
20056
20044
  const computedHash = await hash(pke.hashAlgorithm, verifierHashInput.subarray(0, pke.saltSize));
@@ -20075,13 +20063,7 @@ async function verifyAgilePassword(info, password) {
20075
20063
  pke.keyBits,
20076
20064
  pke.hashSize
20077
20065
  );
20078
- const iv3 = await generateIV(
20079
- pke.hashAlgorithm,
20080
- pke.saltValue,
20081
- BLOCK_KEYS.encryptedKeyValue,
20082
- pke.blockSize
20083
- );
20084
- const decryptedKey = await aesCbcDecryptRaw(encKeyKey, iv3, pke.encryptedKeyValue);
20066
+ const decryptedKey = await aesCbcDecryptRaw(encKeyKey, pke.saltValue, pke.encryptedKeyValue);
20085
20067
  return decryptedKey.subarray(0, info.keyData.keyBits / 8);
20086
20068
  }
20087
20069
  async function verifyStandardPassword(info, password) {
@@ -20134,8 +20116,7 @@ async function verifyAgileDataIntegrity(info, key, encryptedPackage) {
20134
20116
  info.dataIntegrity.encryptedHmacValue
20135
20117
  );
20136
20118
  const expectedHmac = decryptedHmacValue.subarray(0, keyData.hashSize);
20137
- const encryptedContent = encryptedPackage.subarray(8);
20138
- const computedHmac = await hmac(keyData.hashAlgorithm, hmacKey, encryptedContent);
20119
+ const computedHmac = await hmac(keyData.hashAlgorithm, hmacKey, encryptedPackage);
20139
20120
  let match = true;
20140
20121
  if (computedHmac.length < keyData.hashSize) {
20141
20122
  match = false;
@@ -20289,14 +20270,13 @@ async function encryptPptx(pptxBuffer, password, options) {
20289
20270
  keyBits,
20290
20271
  hashSize
20291
20272
  );
20292
- const iv1 = await generateIV(hashAlgorithm, pkeSalt, BLOCK_KEYS.verifierHashInput, blockSize);
20293
20273
  const paddedVerifierInput = new Uint8Array(
20294
20274
  Math.ceil(verifierHashInput.length / blockSize) * blockSize
20295
20275
  );
20296
20276
  paddedVerifierInput.set(verifierHashInput);
20297
20277
  const encryptedVerifierHashInput = await aesCbcEncryptNoPad(
20298
20278
  verifierInputKey,
20299
- iv1,
20279
+ pkeSalt,
20300
20280
  paddedVerifierInput
20301
20281
  );
20302
20282
  const verifierHashKey = await deriveAgileKey(
@@ -20308,12 +20288,11 @@ async function encryptPptx(pptxBuffer, password, options) {
20308
20288
  keyBits,
20309
20289
  hashSize
20310
20290
  );
20311
- const iv2 = await generateIV(hashAlgorithm, pkeSalt, BLOCK_KEYS.verifierHashValue, blockSize);
20312
20291
  const paddedVerifierHash = new Uint8Array(Math.ceil(verifierHash.length / blockSize) * blockSize);
20313
20292
  paddedVerifierHash.set(verifierHash);
20314
20293
  const encryptedVerifierHashValue = await aesCbcEncryptNoPad(
20315
20294
  verifierHashKey,
20316
- iv2,
20295
+ pkeSalt,
20317
20296
  paddedVerifierHash
20318
20297
  );
20319
20298
  const encKeyKey = await deriveAgileKey(
@@ -20325,10 +20304,9 @@ async function encryptPptx(pptxBuffer, password, options) {
20325
20304
  keyBits,
20326
20305
  hashSize
20327
20306
  );
20328
- const iv3 = await generateIV(hashAlgorithm, pkeSalt, BLOCK_KEYS.encryptedKeyValue, blockSize);
20329
20307
  const paddedDocumentKey = new Uint8Array(Math.ceil(documentKey.length / blockSize) * blockSize);
20330
20308
  paddedDocumentKey.set(documentKey);
20331
- const encryptedKeyValue = await aesCbcEncryptNoPad(encKeyKey, iv3, paddedDocumentKey);
20309
+ const encryptedKeyValue = await aesCbcEncryptNoPad(encKeyKey, pkeSalt, paddedDocumentKey);
20332
20310
  const encInfo = {
20333
20311
  keyData: {
20334
20312
  saltSize: 16,
@@ -20364,7 +20342,7 @@ async function encryptPptx(pptxBuffer, password, options) {
20364
20342
  const encryptedPackage = await encryptAgilePackage(packageData, documentKey, encInfo);
20365
20343
  const hmacKeyRandom = new Uint8Array(hashSize);
20366
20344
  crypto2.getRandomValues(hmacKeyRandom);
20367
- const hmacValue = await hmac(hashAlgorithm, hmacKeyRandom, encryptedPackage.subarray(8));
20345
+ const hmacValue = await hmac(hashAlgorithm, hmacKeyRandom, encryptedPackage);
20368
20346
  const hmacKeyIV = await generateIV(
20369
20347
  hashAlgorithm,
20370
20348
  keyDataSalt,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-viewer-core",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "PowerPoint PPTX engine: parse, edit, serialize, and convert .pptx files. Framework-agnostic TypeScript SDK.",
5
5
  "keywords": [
6
6
  "angular",