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."); } }
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."); } }
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."); } }