@etsoo/appscript 1.1.61 → 1.1.62

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.
@@ -4,6 +4,7 @@ exports.CoreApp = void 0;
4
4
  const notificationbase_1 = require("@etsoo/notificationbase");
5
5
  const restclient_1 = require("@etsoo/restclient");
6
6
  const shared_1 = require("@etsoo/shared");
7
+ const crypto_js_1 = require("crypto-js");
7
8
  const AddressRegion_1 = require("../address/AddressRegion");
8
9
  const AddressUtils_1 = require("../address/AddressUtils");
9
10
  const ActionResultError_1 = require("../result/ActionResultError");
@@ -202,7 +203,7 @@ class CoreApp {
202
203
  * @returns Pure text
203
204
  */
204
205
  decrypt(messageEncrypted, passphrase) {
205
- return CryptoJS.AES.decrypt(messageEncrypted, this.encryptionEnhance(passphrase)).toString();
206
+ return crypto_js_1.AES.decrypt(messageEncrypted, this.encryptionEnhance(passphrase)).toString();
206
207
  }
207
208
  /**
208
209
  * Detect IP data, call only one time
@@ -244,7 +245,7 @@ class CoreApp {
244
245
  * @returns Result
245
246
  */
246
247
  encrypt(message, passphrase) {
247
- return CryptoJS.AES.encrypt(message, this.encryptionEnhance(passphrase)).toString();
248
+ return crypto_js_1.AES.encrypt(message, this.encryptionEnhance(passphrase)).toString();
248
249
  }
249
250
  /**
250
251
  * Enchance secret passphrase
@@ -1,6 +1,7 @@
1
1
  import { NotificationAlign, NotificationMessageType } from '@etsoo/notificationbase';
2
2
  import { ApiDataError } from '@etsoo/restclient';
3
3
  import { DateUtils, DomUtils, NumberUtils, StorageUtils } from '@etsoo/shared';
4
+ import { AES } from 'crypto-js';
4
5
  import { AddressRegion } from '../address/AddressRegion';
5
6
  import { AddressUtils } from '../address/AddressUtils';
6
7
  import { ActionResultError } from '../result/ActionResultError';
@@ -199,7 +200,7 @@ export class CoreApp {
199
200
  * @returns Pure text
200
201
  */
201
202
  decrypt(messageEncrypted, passphrase) {
202
- return CryptoJS.AES.decrypt(messageEncrypted, this.encryptionEnhance(passphrase)).toString();
203
+ return AES.decrypt(messageEncrypted, this.encryptionEnhance(passphrase)).toString();
203
204
  }
204
205
  /**
205
206
  * Detect IP data, call only one time
@@ -241,7 +242,7 @@ export class CoreApp {
241
242
  * @returns Result
242
243
  */
243
244
  encrypt(message, passphrase) {
244
- return CryptoJS.AES.encrypt(message, this.encryptionEnhance(passphrase)).toString();
245
+ return AES.encrypt(message, this.encryptionEnhance(passphrase)).toString();
245
246
  }
246
247
  /**
247
248
  * Enchance secret passphrase
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.1.61",
3
+ "version": "1.1.62",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -14,6 +14,7 @@ import {
14
14
  NumberUtils,
15
15
  StorageUtils
16
16
  } from '@etsoo/shared';
17
+ import { AES } from 'crypto-js';
17
18
  import { AddressRegion } from '../address/AddressRegion';
18
19
  import { AddressUtils } from '../address/AddressUtils';
19
20
  import { ActionResultError } from '../result/ActionResultError';
@@ -648,7 +649,7 @@ export abstract class CoreApp<
648
649
  * @returns Pure text
649
650
  */
650
651
  decrypt(messageEncrypted: string, passphrase: string) {
651
- return CryptoJS.AES.decrypt(
652
+ return AES.decrypt(
652
653
  messageEncrypted,
653
654
  this.encryptionEnhance(passphrase)
654
655
  ).toString();
@@ -701,7 +702,7 @@ export abstract class CoreApp<
701
702
  * @returns Result
702
703
  */
703
704
  encrypt(message: string, passphrase: string) {
704
- return CryptoJS.AES.encrypt(
705
+ return AES.encrypt(
705
706
  message,
706
707
  this.encryptionEnhance(passphrase)
707
708
  ).toString();