//传参加密
// import CryptoJS from 'crypto-js';
var CryptoJS = require("crypto-js");

function encryption(params) {
  let key = CryptoJS.enc.Utf8.parse('&qsh9li1KxZa9la@')
  let iv = CryptoJS.enc.Utf8.parse('&qsh9li1KxZa9la@')
  let srcs = CryptoJS.enc.Utf8.parse(params)
  let result = CryptoJS.AES.encrypt(srcs, key, {
    iv,
    mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7
  }).toString()
  return result
};

export default encryption;