Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.71 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.71 KB

gpg-utils Build Maintainability codecov Maven Central javadoc

GPGUtils is a simple wrapper for ProcessBuilder to make shell out to gpg easier in Java.

What

It provides a simple interface for encrypting/decrypting String, File and InputStream.

There's also generic method to run other gpg command.

Why

Existing solutions for using gpg in Java have mostly involved BouncyCastle. It works, but, its API isn't the nicest to use, to say the least.

Using ProcessBuilder is much simpler compared with BouncyCastle. But it's not easy to get IO buffering right for external processes.

GPGUtils tries to provide a simple interface while hiding away the complexity of IO buffer handling.

How to use

Refer to the Unit Tests for now.

Running Tests

mvn verify

Deploy

Need to set environment variables first:

  • GPG_KEYNAME
  • OSSRH_USERNAME
  • OSSRH_PASSWORD
mvn -s settings.xml -P ossrh clean deploy