public string encrypt_public_key(string file, string strLine) { //@"D:\Net\Web\id_rsa.pem.pub" //string pemstr = File.ReadAllText(@"D:\Net\Web\id_rsa").Trim(); string aaa = PemKeyUtils.RSAEncrypt(file, strLine);// "hhh,test"); return(aaa); }
public string decrypt_private_key(string file, string strLine) { try { string bbb = PemKeyUtils.RSADecrypt(file, strLine); return(bbb); } catch (Exception ex) { return(ex.ToString()); } }