import jsencrypt from '@/js_sdk/jsencrypt-Rsa/jsencrypt/jsencrypt.vue'
// import JSEncrypt from './jsencrypt.js';
 
// 加密公钥
let key = `
	-----BEGIN PUBLIC KEY-----
	MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDvUWs2UiUj8quRyePoTXZLlK+Q
	vWnyPLgsvYdZedfwQIK4DYdkYwqMHvuPAc1xYjtMqegGpF8cmMpnz3w32zB1ESWx
	PXWYZETytDmRp4BUyA4usmVLA0Z9SwDEURDyjrJSdBuKqeid3fMk6C+3YmI/kxvP
	/rj9Oj+LX9YaMUKgqwIDAQAB
	-----END PUBLIC KEY-----
`
// 加密
// 此加密公钥不能含有 '_' '-'字符串 参考：https://www.codenong.com/jsc71374f48fb3/
 
export function rsaEncrypt(msg) {
  var encryptMsg = jsencrypt.setEncrypt(key, msg)
  return encryptMsg
}
//超长字符加密 支持汉字加密
// var ArrayData=jsencrypt.setLongEncrypt(key,"超长字符加密支持汉字加密");