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