ztechno_core 0.0.18 → 0.0.19

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.
@@ -18,6 +18,7 @@ export declare class ZCryptoService {
18
18
  salt: string;
19
19
  },
20
20
  ): {
21
+ salt: any;
21
22
  data: string;
22
23
  hash: string;
23
24
  };
@@ -72,14 +72,16 @@ class ZCryptoService {
72
72
  }
73
73
  }
74
74
  static hash(hashAlgorithm, data, opt) {
75
+ let salt;
75
76
  if (opt && opt.saltMode === 'simple') {
76
- const salt = opt.salt;
77
+ salt = opt.salt;
77
78
  data = data
78
79
  .split('')
79
80
  .map((c, i) => c + salt.charAt(salt.length % i))
80
81
  .join('');
81
82
  }
82
83
  return {
84
+ salt,
83
85
  data,
84
86
  hash: crypto.createHash(hashAlgorithm).update(data).digest('hex'),
85
87
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztechno_core",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Core files for ztechno framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",