applay-utils 1.8.32 → 1.8.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "applay-utils",
3
- "version": "1.8.32",
3
+ "version": "1.8.33",
4
4
  "description": "Utilitary tools for Applay applications",
5
5
  "scripts": {
6
6
  "build": "npm version patch",
package/utils/crypto.js CHANGED
@@ -2,7 +2,7 @@ const CryptoJS = require('crypto-js');
2
2
  const algorithm = 'aes-256-cbc';
3
3
  const sha1 = require('sha1');
4
4
 
5
- module.exports = {
5
+ const utils = {
6
6
  'genHash': (orig) => {
7
7
  if (!process.env.key) return null;
8
8
  var json = Object({}, orig);
@@ -59,4 +59,6 @@ module.exports = {
59
59
  dataFull.data = utils.protect(dataFull.data);
60
60
  return dataFull;
61
61
  }
62
- }
62
+ }
63
+
64
+ module.exports = utils;
package/utils/jwt.js CHANGED
@@ -2,8 +2,7 @@ const jwt = require('jsonwebtoken');
2
2
  // var process.env.key = process.env.process.env.key;
3
3
  // var process.env.keyportal = process.env.process.env.keyportal;
4
4
 
5
-
6
- module.exports = {
5
+ const utils = {
7
6
  'setKey': (newkey) => { process.env.key = newkey; },
8
7
  'setKeyPortal': (newkey) => { process.env.keyportal = newkey; },
9
8
  'checkPortal': (keyCheck) => keyCheck == process.env.keyportal,
@@ -24,4 +23,7 @@ module.exports = {
24
23
  });
25
24
  return token;
26
25
  }
27
- }
26
+ }
27
+
28
+
29
+ module.exports = utils;