Exemple #1
0
 public void TestPublicKeyExport()
 {
     var ks = new KeySet(Util.TestDataPath(TEST_DATA, "rsa.public"));
     var path = Path.Combine(Path.GetTempPath(), "dummy.pem");
     Console.WriteLine(path);
     ks.ExportPrimaryAsPkcs(path, () => "dummy");
 }
Exemple #2
0
 public void TestSymetricKeyExport()
 {
     var ks = new KeySet(Util.TestDataPath(TEST_DATA, "aes"));
     Expect(() => ks.ExportPrimaryAsPkcs(Path.Combine(Path.GetTempPath(), "dummy.pem"), () => "dummy"),
            Throws.InstanceOf<InvalidKeyTypeException>());
 }