@indra.ai/deva.security 0.3.0 → 0.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.
Files changed (2) hide show
  1. package/feature/methods.js +15 -3
  2. package/package.json +2 -2
@@ -157,9 +157,21 @@ export default {
157
157
  describe: Return system md5 hash for the based deva.
158
158
  ***************/
159
159
  encrypt(packet) {
160
- this.feature('security', packet.id.uid);
161
- const data = this.lib.encrypt(packet.q.text);
162
- const cipher = `cipher: ${data.encrypted}`;
160
+ this.feature('security', `encrypt:${packet.id.uid}`);
161
+ const {global,personal} = this.security();
162
+
163
+ this.zone('security', `encrypt:${packet.id.uid}`);
164
+ this.action('encrypt', packet.id.uid);
165
+
166
+ this.prompt(JSON.stringify(global, null, 2));
167
+
168
+ this.state('data', `encrypt:${packet.id.uid}`); // set state data
169
+ const data = this.lib.encrypt(packet.q.text, global.encrypt);
170
+
171
+ console.log('encrypted data', data);
172
+
173
+ const cipher = `encrypt: ${data.encrypted}`;
174
+
163
175
  return Promise.resolve(cipher);
164
176
  },
165
177
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "45249771785697968797",
3
3
  "name": "@indra.ai/deva.security",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "license": "VLA:45249771785697968797 LICENSE.md",
6
6
  "VLA": {
7
7
  "uid": "45249771785697968797",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "homepage": "https://deva.space/devas/security",
62
62
  "dependencies": {
63
- "@indra.ai/deva": "^1.21.0",
63
+ "@indra.ai/deva": "^1.21.1",
64
64
  "mongodb": "^6.20.0"
65
65
  },
66
66
  "data": {