public void testRSAKeyGeneration() throws Exception { RSAKeyPairGenerator.main(new String[] { "test", "password" }); createSmallTestInput(); createLargeTestInput(); checkSigning("bpg"); checkKeyBasedEncryption("bpg"); checkLargeKeyBasedEncryption("bpg"); RSAKeyPairGenerator.main(new String[] { "-a", "test", "password" }); checkSigning("asc"); checkKeyBasedEncryption("asc"); checkLargeKeyBasedEncryption("asc"); }
public void testClearSigned() throws Exception { createTestFile(clearSignedPublicKey, "pub.bpg"); checkClearSignedVerify(nlOnlySignedMessage); checkClearSignedVerify(crOnlySignedMessage); checkClearSignedVerify(crNlSignedMessage); checkClearSignedVerify(crNlSignedMessageTrailingWhiteSpace); ClearSignedFileProcessor.main(new String[] { "-v", "test.txt.asc", "pub.bpg" }); RSAKeyPairGenerator.main(new String[] { "test", "password" }); checkClearSigned(crOnlyMessage); checkClearSigned(nlOnlyMessage); checkClearSigned(crNlMessage); checkClearSigned(crNlMessageTrailingWhiteSpace); }