@indra.ai/deva.security 0.0.30 → 0.0.32

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 +61 -27
  2. package/package.json +1 -1
@@ -81,6 +81,32 @@ export default {
81
81
  const theDate = this.lib.formatDate(Date.now(), 'long', true);
82
82
  return Promise.resolve(theDate);
83
83
  },
84
+ /**************
85
+ method: time
86
+ params: packet
87
+ describe: Return current system hash time.
88
+ ***************/
89
+ async time(packet) {
90
+ this.feature('security');
91
+ const timestamp = Date.now();
92
+ const created = this.lib.formatDate(Date.now(), 'long', true);
93
+
94
+ const data = {
95
+ packet,
96
+ timestamp,
97
+ created,
98
+ }
99
+ data.md5 = this.lib.hash(data, 'md5');
100
+ data.sha256 = this.lib.hash(data, 'sha256');
101
+ data.sha512 = this.lib.hash(data, 'sha512');
102
+
103
+ const feecting = await this.question(`${this.askChr}feecting parse ${text}`);
104
+ return {
105
+ text: feecting.a.text,
106
+ html: feecting.a.html,
107
+ data,
108
+ }
109
+ },
84
110
 
85
111
  /**************
86
112
  method: md5 cipher
@@ -100,58 +126,66 @@ export default {
100
126
  const uid = this.lib.uid(true);
101
127
  const transport = packet.id;
102
128
 
103
- let type;
104
129
  const {meta} = packet.q;
105
130
  const {params} = meta;
131
+ const opts = this.lib.copy(params);
132
+ const cmd = opts.shift();
106
133
 
107
- if (!params[1] || params[1] === 'client') type = `#${meta.key}.${params.join('.')}`;
108
- else type = `#${meta.key}.${params.join('.')}`;
109
-
110
- const signer = !params[1] || params[1] === 'client' ? this.client() : this.agent();
111
- const created = this.lib.formatDate(Date.now(), 'long', true);
134
+ const signer = !params[1] || params[1] === 'agent' ? this.agent() : this.client();
135
+ const {profile} = signer;
136
+
137
+ const timestamp = Date.now();
138
+ const created = this.lib.formatDate(timestamp, 'long', true);
112
139
  const message = packet.q.text || '';
113
140
  const client = this.client();
114
- const {profile} = signer;
115
-
116
- console.log(client.profile.token);
117
-
141
+ const agent = this.agent();
142
+
118
143
  const data = {
119
144
  uid,
120
145
  transport,
121
- type,
122
- signer: signer.id,
146
+ opts: opts.join(' '),
147
+ client: client.profile,
148
+ agent: agent.profile,
123
149
  name: profile.name,
150
+ computer: profile.computer,
151
+ network: profile.network,
124
152
  caseid: profile.caseid,
125
153
  message,
126
- token: client.profile.token,
127
- copyright: profile.copyright,
154
+ religion: profile.religion,
128
155
  created,
156
+ timestamp,
157
+ token: profile.token,
158
+ copyright: profile.copyright,
129
159
  };
130
160
  data.md5 = this.lib.hash(data, 'md5');
131
161
  data.sha256 = this.lib.hash(data, 'sha256');
132
-
162
+ data.sha512 = this.lib.hash(data, 'sha512');
163
+
133
164
  const text = [
134
- '::::::::::::::::::',
165
+ `uid: ${data.uid}`,
166
+ `write ${data.opts}? if yes then write ${data.message}`,
135
167
  `::begin:signature:VectorGuardShield:${data.transport}`,
136
- `type: ${type}`,
168
+ `transport: ${data.transport}`,
169
+ `caseid: ${data.caseid}`,
170
+ `agent: ${agent.profile.id}`,
171
+ `client: ${client.profile.id}`,
137
172
  `name: ${data.name}`,
138
- `message: ${data.message}`,
139
- `token: ${data.token}`,
140
- `---`,
141
- `id: ${data.uid}`,
142
- `${type}_id: ${data.signer}`,
143
- `transport_id: ${data.transport}`,
144
- `case_id: ${data.caseid}`,
173
+ `religion: ${data.religion}`,
174
+ `computer: ${data.computer}`,
175
+ `network: ${data.network}`,
176
+ `companies: ${JSON.stringify(data.companies)}`,
145
177
  `copyright: ${data.copyright}`,
146
178
  `created: ${data.created}`,
179
+ `timestamp: ${data.timestamp}`,
147
180
  `md5: ${data.md5}`,
148
181
  `sha256: ${data.sha256}`,
182
+ `sha512: ${data.sha512}`,
149
183
  `::end:signature:VectorGuardShield:${data.transport}`,
150
- '::::::::::::::::::',
151
184
  ].join('\n').trim();
185
+ const feecting = await this.question(`${this.askChr}feecting parse ${text}`);
152
186
  return {
153
- text,
154
- html: false,
187
+ text: feecting.a.text,
188
+ html: feecting.a.html,
155
189
  data,
156
190
  }
157
191
  },
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.30",
4
+ "version": "0.0.32",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2025",