//公钥加密function encrypt(data){ var obj = new JSEncrypt(); obj.setPublicKey(RSA_PUBLIC_KEY); //公钥 var data = obj.encrypt(data); return data;}//私钥解密function decrypt(data){ var obj = new JSEncrypt(); obj.setPrivateKey(RSA_PRIVATE_KEY); //私钥 var data = obj.decrypt