Skip to content

Simple Wrapper for shelling out to gpg

License

Notifications You must be signed in to change notification settings

lyang/gpg-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple Wrapper for shelling out to gpg

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages