Ejemplo n.º 1
0
 private static void DecryptFile()
 {
     using (PGP.Decrypt pgp = new PGP.Decrypt())
     {
         pgp.DecryptFileWithPath(
             inputFilePath: "Sample_file.txt.pgp",
             outputFilePath: "Sample_file.out.txt",
             privateKeyFilePath: "Sample_private_key.asc",
             passPhrase: "password123");
         Console.WriteLine("PGP Decryption done.");
     }
 }
Ejemplo n.º 2
0
 private static void DecryptFileWithString()
 {
     using (PGP.Decrypt pgp = new PGP.Decrypt())
     {
         pgp.DecryptFileWithStringKey(
             inputFilePath: "Sample_file_stream.txt.pgp",
             outputFilePath: "Sample_file_stream.out.txt",
             privateKeyString: Constants.privateKey,
             passPhrase: "password123");
         Console.WriteLine("PGP Stream private key Decryption done.");
     }
 }
Ejemplo n.º 3
0
 private static void DecryptFileNVerify()
 {
     using (PGP.Decrypt pgp = new PGP.Decrypt())
     {
         pgp.DecryptFileAndVerify(
             inputFilePath: "Sample_file.nisgn.txt.pgp",
             outputFilePath: "Sample_file.nisgn.out.txt",
             publicKeyFilePath: "Sample_public_key.asc",
             privateKeyFilePath: "Sample_private_key.asc",
             passPhrase: "password123");
         Console.WriteLine("PGP Decryption done.");
     }
 }