Exemple #1
0
 private string DecryptNVerifyInMemory(MemoryStream text, string pass)
 {
     using (ChoPGPEncryptDecrypt pgp = new ChoPGPEncryptDecrypt())
     {
         using (MemoryStream a = new System.IO.MemoryStream())
         {
             Stream message;
             message = pgp.DecryptAndVerifyInMemory(text, a, "Sample_Pub.asc", "Sample_Pri.asc", pass);
             MemoryStream ms = new MemoryStream();;
             message.CopyTo(ms);
             ms = new MemoryStream(a.ToArray());
             StreamReader reader = new StreamReader(ms);
             return(reader.ReadToEnd());
         }
     }
 }