@indra.ai/deva 1.20.4 → 1.21.0
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.
- package/index.js +1 -1
- package/lib/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2438,7 +2438,7 @@ class Deva {
|
|
|
2438
2438
|
|
|
2439
2439
|
const client_hash = this.client().sha256; // get client hash
|
|
2440
2440
|
const agent_hash = this.agent().sha256; // get agent hash
|
|
2441
|
-
const warning = this._agent.profile.warning || this._messages.warning; // agent or default warning
|
|
2441
|
+
const warning = this.vars.warning || this._agent.profile.warning || this._messages.warning; // agent or default warning
|
|
2442
2442
|
const copyright = this._agent.profile.copyright || this._core.copyright; // agent or default copyright
|
|
2443
2443
|
|
|
2444
2444
|
const status = this._agent.profile.status || this._messages.status;
|
package/lib/index.js
CHANGED
|
@@ -62,7 +62,7 @@ class LIB {
|
|
|
62
62
|
const _cipher = createCipheriv(algorithm, key_in_bytes, iv);
|
|
63
63
|
const encrypted = _cipher.update(String(str), 'utf8', 'hex') + _cipher.final('hex');
|
|
64
64
|
|
|
65
|
-
this.action('return', '
|
|
65
|
+
this.action('return', 'encrypt');
|
|
66
66
|
return {
|
|
67
67
|
iv: iv.toString('base64'),
|
|
68
68
|
key,
|
|
@@ -83,7 +83,7 @@ class LIB {
|
|
|
83
83
|
const iv = Buffer.from(opts.iv, 'base64');
|
|
84
84
|
const encrypted = Buffer.from(opts.encrypted, 'hex');
|
|
85
85
|
const key_in_bytes = Buffer.from(key, 'base64')
|
|
86
|
-
const decipher = createDecipheriv(
|
|
86
|
+
const decipher = createDecipheriv(algorithm, key_in_bytes, iv);
|
|
87
87
|
const decrypted = decipher.update(encrypted, 'hex', 'utf8');
|
|
88
88
|
const final = Buffer.concat([decrypted, decipher.final('utf8')]);
|
|
89
89
|
this.action('return', 'decipher');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "64907438819979111427",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.21.0",
|
|
5
5
|
"description": "Deva Core a Vedic-inspired Event Based Context Aware Feature, Zone, Action, and State Machine integrated Artificial Intelligence Framework",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"license": "VLA:64907438819979111427 LICENSE.md",
|