@indra.ai/deva.security 0.0.34 → 0.0.35

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 +14 -1
  2. package/package.json +1 -1
@@ -66,8 +66,21 @@ export default {
66
66
  describe: Return system md5 hash for the based deva.
67
67
  ***************/
68
68
  hash(packet) {
69
+ const transport = packet.id;
69
70
  this.feature('security');
70
- const hash = this.lib.hash(packet.q.text, 'md5');
71
+ this.action('method', `hash:${transport}`);
72
+
73
+ this.state('set', `meta:${transport}`); //set the meta state for the proxy
74
+ const {meta} = packet.q; // set the meta information from the packet question.
75
+
76
+ this.state('set', `params:${transport}`); //set the meta state for the proxy
77
+ const {params} = meta; // set params from the meta information.
78
+
79
+ this.state('set', `algo:${transport}`); //set the meta state for the proxy
80
+ const algo = params[1] ? params[1] : 'md5'
81
+
82
+ this.state('set', `hash:${transport}`); //set the meta state for the proxy
83
+ const hash = this.lib.hash(packet.q.text, algo);
71
84
  return Promise.resolve(hash);
72
85
  },
73
86
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 6507120243760,
3
3
  "name": "@indra.ai/deva.security",
4
- "version": "0.0.34",
4
+ "version": "0.0.35",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2025",