@etsoo/appscript 1.1.74 → 1.1.75
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/lib/cjs/app/CoreApp.js +5 -2
- package/lib/mjs/app/CoreApp.js +5 -2
- package/package.json +1 -1
- package/src/app/CoreApp.ts +5 -2
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -321,11 +321,14 @@ class CoreApp {
|
|
|
321
321
|
hasher: crypto_js_1.algo.SHA256,
|
|
322
322
|
iterations: 1000 * iterations
|
|
323
323
|
});
|
|
324
|
-
|
|
324
|
+
const bytes = crypto_js_1.AES.decrypt(encrypted, key, {
|
|
325
325
|
iv,
|
|
326
326
|
padding: crypto_js_1.pad.Pkcs7,
|
|
327
327
|
mode: crypto_js_1.mode.CBC
|
|
328
|
-
})
|
|
328
|
+
});
|
|
329
|
+
if (bytes.words.length == 0)
|
|
330
|
+
return undefined;
|
|
331
|
+
return bytes.toString(crypto_js_1.enc.Utf8);
|
|
329
332
|
}
|
|
330
333
|
/**
|
|
331
334
|
* Enhanced decrypt message
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -318,11 +318,14 @@ export class CoreApp {
|
|
|
318
318
|
hasher: algo.SHA256,
|
|
319
319
|
iterations: 1000 * iterations
|
|
320
320
|
});
|
|
321
|
-
|
|
321
|
+
const bytes = AES.decrypt(encrypted, key, {
|
|
322
322
|
iv,
|
|
323
323
|
padding: pad.Pkcs7,
|
|
324
324
|
mode: mode.CBC
|
|
325
|
-
})
|
|
325
|
+
});
|
|
326
|
+
if (bytes.words.length == 0)
|
|
327
|
+
return undefined;
|
|
328
|
+
return bytes.toString(enc.Utf8);
|
|
326
329
|
}
|
|
327
330
|
/**
|
|
328
331
|
* Enhanced decrypt message
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -870,11 +870,14 @@ export abstract class CoreApp<
|
|
|
870
870
|
iterations: 1000 * iterations
|
|
871
871
|
});
|
|
872
872
|
|
|
873
|
-
|
|
873
|
+
const bytes = AES.decrypt(encrypted, key, {
|
|
874
874
|
iv,
|
|
875
875
|
padding: pad.Pkcs7,
|
|
876
876
|
mode: mode.CBC
|
|
877
|
-
})
|
|
877
|
+
});
|
|
878
|
+
if (bytes.words.length == 0) return undefined;
|
|
879
|
+
|
|
880
|
+
return bytes.toString(enc.Utf8);
|
|
878
881
|
}
|
|
879
882
|
|
|
880
883
|
/**
|