Java 类org.bouncycastle.openpgp.examples.KeyBasedFileProcessor 实例源码

项目:CryptMeme    文件:AllTests.java   
private void checkKeyBasedEncryption(String type)
    throws Exception
{
    _currentErr.reset();

    KeyBasedFileProcessor.main(new String[] { "-e", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.bpg", "secret." + type, "password" });

    assertEquals("no message integrity check", getLine(_currentErr));

    KeyBasedFileProcessor.main(new String[] { "-e", "-i", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.bpg", "secret." + type, "password" });

    assertEquals("message integrity check passed", getLine(_currentErr));

    KeyBasedFileProcessor.main(new String[] { "-e", "-ai", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.asc", "secret." + type, "password" });

    assertEquals("message integrity check passed", getLine(_currentErr));
}
项目:irma_future_id    文件:AllTests.java   
private void checkKeyBasedEncryption(String type)
    throws Exception
{
    _currentErr.reset();

    KeyBasedFileProcessor.main(new String[] { "-e", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.bpg", "secret." + type, "password" });

    assertEquals("no message integrity check", getLine(_currentErr));

    KeyBasedFileProcessor.main(new String[] { "-e", "-i", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.bpg", "secret." + type, "password" });

    assertEquals("message integrity check passed", getLine(_currentErr));

    KeyBasedFileProcessor.main(new String[] { "-e", "-ai", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.asc", "secret." + type, "password" });

    assertEquals("message integrity check passed", getLine(_currentErr));
}
项目:bc-java    文件:AllTests.java   
private void checkKeyBasedEncryption(String type)
    throws Exception
{
    _currentErr.reset();

    KeyBasedFileProcessor.main(new String[] { "-e", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.bpg", "secret." + type, "password" });

    assertEquals("no message integrity check", getLine(_currentErr));

    KeyBasedFileProcessor.main(new String[] { "-e", "-i", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.bpg", "secret." + type, "password" });

    assertEquals("message integrity check passed", getLine(_currentErr));

    KeyBasedFileProcessor.main(new String[] { "-e", "-ai", "test.txt", "pub." + type });

    KeyBasedFileProcessor.main(new String[] { "-d", "test.txt.asc", "secret." + type, "password" });

    assertEquals("message integrity check passed", getLine(_currentErr));
}