spd-lib 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -95,10 +95,14 @@ this.salt = salt;
95
95
  await sodium.ready;
96
96
  let extractedFiles = {};
97
97
  this.data.forEach(async dat => {
98
+ try{
98
99
  const decryptedData = sodium.crypto_secretbox_open_easy(dat.data, dat.nonce, this.userKey);
99
100
  const decompressedData = zlib.inflateSync(decryptedData);
100
101
  const dt = decompressedData.toString('utf8');
101
102
  extractedFiles[dat.dataName] = await this.CSTI(dt, dat.dataType);
103
+ }catch{
104
+ rej()
105
+ }
102
106
  });
103
107
  res(extractedFiles);
104
108
  }catch{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spd-lib",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "SPD or Secure Packaged Data is a compress PQC protected file format to store sensitive data localy",
5
5
  "main": "index.js",
6
6
  "scripts": {