(data, key, iv)
| 729 | return (e = e.substr(0, 16)), e; |
| 730 | } |
| 731 | function AES_CBC_Encrypt(data, key, iv) { |
| 732 | key = CryptoJS.enc.Utf8.parse(key); |
| 733 | iv = CryptoJS.enc.Utf8.parse(iv); |
| 734 | if ("object" == typeof data) |
| 735 | try { |
| 736 | data = JSON.stringify(data); |
| 737 | } catch (r) { |
| 738 | console.log("encrypt error:", r); |
| 739 | } |
| 740 | data = CryptoJS.enc.Utf8.parse(data); |
| 741 | //console.log(data); |
| 742 | return CryptoJS.AES.encrypt(data, key, { |
| 743 | iv: iv, |
| 744 | mode: CryptoJS.mode.CBC, |
| 745 | padding: CryptoJS.pad.Pkcs7, |
| 746 | }).ciphertext.toString(CryptoJS.enc.Base64); |
| 747 | } |
| 748 | |
| 749 | //逆向参数url https://app.nevapp.gtmc.com.cn/h5/assets/index.a0bf569f.js |
| 750 |
no test coverage detected