Beispiel #1
0
        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);
        }
Beispiel #2
0
 public string decrypt_private_key(string file, string strLine)
 {
     try {
         string bbb = PemKeyUtils.RSADecrypt(file, strLine);
         return(bbb);
     } catch (Exception ex) {
         return(ex.ToString());
     }
 }