Yaniv's Web Corner

GnuPG Java Wrapper API

By Yaniv Yemini


This small class provides a Java API that calls GnuPG (GPG) to perform PGP functions, such as:

  • Sign
  • ClearSign
  • Encrypt
  • Decrypt

The latest code can be downloaded from here (version 0.5).

Sample Code:

Click here for sample code.

For comments, suggestions etc, please contact me here.

Based on a class GnuPG by John Anderson, which can be found at: http://lists.gnupg.org/pipermail/gnupg-devel/2002-February/018098.html.


  • Add support for verifying PGP signatures.
  • Check why getErrorStream () returns the gpg's STDOUT stream and STDERR.

Warning: require_once(Cache/Lite/Output.php): failed to open stream: No such file or directory in /home/content/18/4381118/html/yaniv/incl/recentPostsInc.php on line 9

Fatal error: require_once(): Failed opening required 'Cache/Lite/Output.php' (include_path='.:/usr/local/php5_6/lib/php') in /home/content/18/4381118/html/yaniv/incl/recentPostsInc.php on line 9

© Yaniv Yemini, 1998-2010