mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-09-03 04:03:46 +08:00
修复EncryptUtil解密报错问题
This commit is contained in:
@@ -14,8 +14,8 @@ export class EncryptUtil {
|
||||
*/
|
||||
static aesEncrypt(msg: string, key: string, iv: string): string {
|
||||
//@ts-ignore
|
||||
let encrypt = CryptoJS.AES.encrypt(msg, utf8Parse(key), {
|
||||
iv: this.utf8Parse(iv),
|
||||
let encrypt = CryptoJS.AES.encrypt(msg, key, {
|
||||
iv: iv,
|
||||
//@ts-ignore
|
||||
mode: CryptoJS.mode.CBC,
|
||||
//@ts-ignore
|
||||
@@ -32,8 +32,8 @@ export class EncryptUtil {
|
||||
*/
|
||||
static aesDecrypt(str: string, key: string, iv: string): string {
|
||||
//@ts-ignore
|
||||
let decrypt = CryptoJS.AES.decrypt(str, this.utf8Parse(key), {
|
||||
iv: this.utf8Parse(iv),
|
||||
let decrypt = CryptoJS.AES.decrypt(str, key, {
|
||||
iv: iv,
|
||||
//@ts-ignore
|
||||
mode: CryptoJS.mode.CBC,
|
||||
//@ts-ignore
|
||||
@@ -42,9 +42,4 @@ export class EncryptUtil {
|
||||
//@ts-ignore
|
||||
return CryptoJS.enc.Utf8.stringify(decrypt);
|
||||
}
|
||||
|
||||
private static utf8Parse(utf8Str: string): string {
|
||||
//@ts-ignore
|
||||
return CryptoJS.enc.Utf8.parse(utf8Str);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
"userData": {
|
||||
"isPlugin": true,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": false,
|
||||
"executionScope": "global"
|
||||
"loadPluginInNative": true,
|
||||
"executionScope": "enclosed"
|
||||
}
|
||||
}
|
||||
|
||||
2
temp/declarations/cc.d.ts
vendored
2
temp/declarations/cc.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
|
||||
/// <reference path="D:\CocosDashboard_1.1.0\resources\.editors\Creator\3.6.0\resources\resources\3d\engine\bin\.declarations\cc.d.ts"/>
|
||||
/// <reference path="D:\CocosDashboard_1.0.6\resources\.editors\Creator\3.6.0\resources\resources\3d\engine\bin\.declarations\cc.d.ts"/>
|
||||
|
||||
/**
|
||||
* @deprecated Global variable `cc` was dropped since 3.0. Use ES6 module syntax to import Cocos Creator APIs.
|
||||
|
||||
2
temp/declarations/jsb.d.ts
vendored
2
temp/declarations/jsb.d.ts
vendored
@@ -1 +1 @@
|
||||
/// <reference path="D:\CocosDashboard_1.1.0\resources\.editors\Creator\3.6.0\resources\resources\3d\engine\@types\jsb.d.ts"/>
|
||||
/// <reference path="D:\CocosDashboard_1.0.6\resources\.editors\Creator\3.6.0\resources\resources\3d\engine\@types\jsb.d.ts"/>
|
||||
|
||||
Reference in New Issue
Block a user