mystic-crypt is designed as a Java library that can be used for simple and complex encryption and decryption.
The source code for the library is available under https://github.com/astrapi69/mystic-crypt
For demonstration what the library can do there is a graphical client:
The source code for the ui is available under https://github.com/astrapi69/mystic-crypt-ui
...Now supports key change auditing and key descriptors (uKAD). Check the Project News under the Develop section for more information.
Project source code has moved to https://github.com/scsitape/stenc