Ejemplo n.º 1
0
        private static void GenerateKeyPair()
        {
            using (ChoPGPEncryptDecrypt pgp = new ChoPGPEncryptDecrypt())
                pgp.GenerateKey("pub.asc", "pri.asc", "*****@*****.**", "Test123");

            Console.WriteLine("PGP KeyPair generated.");
        }
Ejemplo n.º 2
0
 public static void initialize(TestContext testContext)
 {
     if (!File.Exists("SampleData.txt"))
     {
         File.Create("SampleData.txt").Close();
     }
     using (FileStream fs = File.OpenWrite("SampleData.txt"))
     {
         string data        = "hola";
         byte[] information = new UTF8Encoding(true).GetBytes(data);
         fs.Write(information, 0, information.Length);
     }
     using (ChoPGPEncryptDecrypt pgp = new ChoPGPEncryptDecrypt())
         pgp.GenerateKey("Sample_Pub.asc", "Sample_Pri.asc", "*****@*****.**", "Test123");
     Console.WriteLine("PGP KeyPair generated.");
 }
Ejemplo n.º 3
0
 public void TESTGenerateKeyPair()
 {
     using (ChoPGPEncryptDecrypt pgp = new ChoPGPEncryptDecrypt())
         pgp.GenerateKey("Sample_Pub.asc", "Sample_Pri.asc", "*****@*****.**", "Test123");
     Console.WriteLine("PGP KeyPair generated.");
 }