spd-lib 1.0.6 → 1.0.7

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 (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +2 -4
  3. package/readme.md +5 -5
package/index.js CHANGED
@@ -90,7 +90,7 @@ this.pwd = true;
90
90
  return spd;
91
91
  }
92
92
 
93
- async extractFiles() {
93
+ async extractData() {
94
94
  await sodium.ready;
95
95
  let extractedFiles = {};
96
96
  this.data.forEach(dat => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "spd-lib",
3
- "version": "1.0.6",
4
- "description": "SPD or Secure Packaged Data is a compress PQC protected file format to sotre sensitive data localy",
3
+ "version": "1.0.7",
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": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -21,8 +21,6 @@
21
21
  "author": "ALS-OPSS",
22
22
  "license": "ISC",
23
23
  "dependencies": {
24
- "crypto": "^1.0.1",
25
- "fs": "^0.0.1-security",
26
24
  "libsodium-wrappers": "^0.7.13"
27
25
  }
28
26
  }
package/readme.md CHANGED
@@ -21,13 +21,13 @@ const { SPD } = require('spd-lib');
21
21
 
22
22
  const passcode = 'your-secure-passcode';
23
23
  const spd = new SPD(); // Create a new SPD object // Set the passcode to the SPD object
24
- await spd.setPassKey(passcode); // Add data to the SPD object
25
- await spd.addData('settings', '{"theme":"dark"}'); // Add a file to the SPD object
26
- await spd.addData('tabs', '[{"title":"Home","url":"https://example.com"},{"title":"About","url":"https://example.com/about"}]'); // Add another file to the SPD object
24
+ await spd.setPassKey(passcode); // Set Passkey
25
+ await spd.addData('settings', '{"theme":"dark"}'); // Add a data to the SPD object
26
+ await spd.addData('tabs', '[{"title":"Home","url":"https://example.com"},{"title":"About","url":"https://example.com/about"}]'); // Add more data to the SPD object
27
27
  spd.saveToFile('output.spd'); // Save SPD file to disk with the salt
28
28
  const loadedSpd = await SPD.loadFromFile('output.spd', passcode); // Load SPD file with the passcode
29
- const extractedFiles = await loadedSpd.extractFiles(); // Extract files to memory
30
- console.log(extractedFiles); // Print extracted files to console
29
+ const extractedData = await loadedSpd.extractData(); // Extract data to memory
30
+ console.log(extractedData); // Print extracted files to console
31
31
  })();
32
32
  ```
33
33