public void TestClearSignedBogusInput() { CreateTestFile(clearSignedPublicKey, "test.txt"); RsaKeyRingGenerator.Main(new string[] { "test", "password" }); ClearSignedFileProcessor.Main(new string[] { "-s", "test.txt", "secret.bpg", "password" }); }
public void TestClearSignedSingleLine() { CreateTestData("This is a test payload!" + Environment.NewLine, "test.txt"); CreateTestData("This is a test payload!" + Environment.NewLine, "test.bak"); RsaKeyRingGenerator.Main(new string[] { "test", "password" }); ClearSignedFileProcessor.Main(new string[] { "-s", "test.txt", "secret.bpg", "password" }); ClearSignedFileProcessor.Main(new string[] { "-v", "test.txt.asc", "pub.bpg" }); CompareFile("test.bak", "test.txt"); }
public void TestRsaKeyGeneration() { RsaKeyRingGenerator.Main(new string[] { "test", "password" }); CreateSmallTestInput(); CreateLargeTestInput(); CheckSigning("bpg"); CheckKeyBasedEncryption("bpg"); CheckLargeKeyBasedEncryption("bpg"); RsaKeyRingGenerator.Main(new string[] { "-a", "test", "password" }); CheckSigning("asc"); CheckKeyBasedEncryption("asc"); CheckLargeKeyBasedEncryption("asc"); }
public void TestClearSigned() { CreateTestFile(clearSignedPublicKey, "pub.bpg"); CheckClearSignedVerify(nlOnlySignedMessage); CheckClearSignedVerify(crOnlySignedMessage); CheckClearSignedVerify(crNlSignedMessage); CheckClearSignedVerify(crNlSignedMessageTrailingWhiteSpace); ClearSignedFileProcessor.Main(new string[] { "-v", "test.txt.asc", "pub.bpg" }); RsaKeyRingGenerator.Main(new string[] { "test", "password" }); CheckClearSigned(crOnlyMessage); CheckClearSigned(nlOnlyMessage); CheckClearSigned(crNlMessage); CheckClearSigned(crNlMessageTrailingWhiteSpace); }