Beispiel #1
0
 private string DecryptString(MemoryStream text, string pass)
 {
     using (ChoPGPEncryptDecrypt pgp = new ChoPGPEncryptDecrypt())
     {
         using (MemoryStream a = new System.IO.MemoryStream())
         {
             byte[]       r      = pgp.DecryptInMemory(text.ToArray(), File.OpenRead("Sample_Pri.asc"), pass);
             MemoryStream ms     = new MemoryStream(r);
             StreamReader reader = new StreamReader(ms);
             return(reader.ReadToEnd());
         }
     }
 }