system-clients 1.8.30-cr → 1.8.31-cr

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.
@@ -1,30 +1,30 @@
1
- import AesEncryptJS from 'crypto-js'
2
-
3
- export default {
4
- /**
5
- * AES加密
6
- * @param word
7
- * @returns {*}
8
- */
9
- AESEncrypt (word, encryKey) {
10
- var key = AesEncryptJS.enc.Utf8.parse(encryKey)
11
- var srcs = AesEncryptJS.enc.Utf8.parse(word)
12
- var encrypted = AesEncryptJS.AES.encrypt(srcs, key, {mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7})
13
- return encrypted.toString()
14
- },
15
- /**
16
- * AES解密
17
- * @param word
18
- * @returns {*}
19
- */
20
- AESDecrypt (word, encryKey) {
21
- var key = AesEncryptJS.enc.Utf8.parse(encryKey)
22
- var decrypt = AesEncryptJS.AES.decrypt(word, key, {mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7})
23
- var ret = AesEncryptJS.enc.Utf8.stringify(decrypt).toString()
24
- try {
25
- return JSON.parse(ret)
26
- } catch (e) {
27
- return ret
28
- }
29
- }
30
- }
1
+ import AesEncryptJS from 'crypto-js'
2
+
3
+ export default {
4
+ /**
5
+ * AES加密
6
+ * @param word
7
+ * @returns {*}
8
+ */
9
+ AESEncrypt (word, encryKey) {
10
+ var key = AesEncryptJS.enc.Utf8.parse(encryKey)
11
+ var srcs = AesEncryptJS.enc.Utf8.parse(word)
12
+ var encrypted = AesEncryptJS.AES.encrypt(srcs, key, {mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7})
13
+ return encrypted.toString()
14
+ },
15
+ /**
16
+ * AES解密
17
+ * @param word
18
+ * @returns {*}
19
+ */
20
+ AESDecrypt (word, encryKey) {
21
+ var key = AesEncryptJS.enc.Utf8.parse(encryKey)
22
+ var decrypt = AesEncryptJS.AES.decrypt(word, key, {mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7})
23
+ var ret = AesEncryptJS.enc.Utf8.stringify(decrypt).toString()
24
+ try {
25
+ return JSON.parse(ret)
26
+ } catch (e) {
27
+ return ret
28
+ }
29
+ }
30
+ }