Sample modul for demonstration how Bouncycastle can be used for making message signatures and encryption.
Base classes:
- Core class is PgpEncryptor. Example of usage can be found in its javadoc or PgpEncryptorTest.
- Important helper class KeyUtils is useful for loading the keys from input streams.
To run the test follow the steps in http:https://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters