public void SignFile_CreateSignedFile(KeyType keyType) { // Arrange TestFactory testFactory = new TestFactory(); testFactory.Arrange(keyType, FileType.Known); PGP pgp = new PGP(); // Act pgp.SignFile(testFactory.ContentFilePath, testFactory.SignedContentFilePath, testFactory.PrivateKeyFilePath, testFactory.Password); // Assert Assert.True(File.Exists(testFactory.SignedContentFilePath)); // Teardown testFactory.Teardown(); }
public void Verify_VerifySignedFile(KeyType keyType) { // Arrange TestFactory testFactory = new TestFactory(); testFactory.Arrange(keyType, FileType.Known); PGP pgp = new PGP(); // Act pgp.SignFile(testFactory.ContentFilePath, testFactory.SignedContentFilePath, testFactory.PrivateKeyFilePath, testFactory.Password); bool verified = pgp.VerifyFile(testFactory.SignedContentFilePath, testFactory.PublicKeyFilePath); // Assert Assert.True(File.Exists(testFactory.SignedContentFilePath)); Assert.True(verified); // Teardown testFactory.Teardown(); }