import JSEncrypt from 'jsencrypt'
// let pubKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCobhvSrXqU7fcVQP4Qq7bz2R4lF18VkuOgT5rVYWJZtZe3FpxUEZrWsR8QhQynUksS/cZHqZy7xujk9GnFB59mV1NgmSZbUA1zUJIyNwWCyhSUzxOnThWnwN7ffVulks0R9GTQwg2ApSdt+HK8n97L6hKSLiHiqhVCMF+WlOxJUwIDAQAB'                      
let RSA = {
    //使用公钥加密

    jiami(str,pubKey) {
        let encryptor = new JSEncrypt();
        encryptor.setPublicKey(pubKey);
        return encryptor.encrypt(str)
    }
    // jiemi(str) {
    //     //使用私钥解密
    //     let decrypt = new JSEncrypt();
    //     decrypt.setPrivateKey(priKey);
    //     let uncrypted = decrypt.decrypt(str);
    //     return uncrypted;

    // }
}
export default RSA