mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-12 00:00:01 +08:00
feat: 新增图表独立配置混合
This commit is contained in:
+2
-2
@@ -2,7 +2,7 @@ import * as CryptoJS from 'crypto-ts'
|
||||
|
||||
export default {
|
||||
AES_KEY: 'mt',
|
||||
encode(data: string): string {
|
||||
cryptoEncode(data: string): string {
|
||||
if (typeof data !== 'string') return ''
|
||||
// 加密
|
||||
const key = CryptoJS.enc.Utf8.parse(this.AES_KEY)
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
return encryptedData.toString()
|
||||
},
|
||||
// 解密
|
||||
decode(data: string): string {
|
||||
cryptoDecode(data: string): string {
|
||||
if (typeof data !== 'string') return ''
|
||||
const encryptedHexStr = CryptoJS.enc.Utf8.parse(data)
|
||||
const encryptedBase64Str = CryptoJS.enc.Utf8.stringify(encryptedHexStr)
|
||||
|
||||
Reference in New Issue
Block a user