(备份前端解密)解密代码如下:
import CryptoJS from 'crypto-js'
import {Base64} from 'js-base64'export default {decryptData(sessionKey, encryptedData, iv) {let key = CryptoJS.enc.Base64.parse(sessionKey)let ivv = CryptoJS.enc.Base64.parse(iv)let decrypt = CryptoJS.AES.decrypt(encryptedData, key, {iv: ivv,mode: CryptoJS.mode.CBC,padding: CryptoJS.pad.Pkcs7})return JSON.parse(Base64.decode(CryptoJS.enc.Base64.stringify(decrypt)))}
}