OpenPGP Library for Java version 2.7 has been released

Today has been released version 2.7.0 of DidiSoft OpenPGP Library for Java.

This version was migrated to the latest version of the BouncyCastle JAR files (1.51), but if you have dependencies in your project that require older version of BouncyCastle, you can still migrate to the new version, because the library ships with pre-built JARs for BouncyCastle from version 1.41 till 1.51.

Oracle DB

The new version allows the library to be used inside the Oracle(c) Database JVM environment and to be invoked from Java stored procedures.

Inline keys

A key new feature is the acceptance of ASCII armored OpenPGP keys as strings in all methods that expect a key file name location. For example:

    String lineFeed = System.getProperty("line.separator");
    String inlinePubKey = "-----BEGIN PGP PUBLIC KEY BLOCK-----"+lineFeed+
    "Version: GnuPG v2.1.0-ecc (GNU/Linux)" +lineFeed+
    lineFeed+
    "mFIETJPQrRMIKoZIzj0DAQcCAwQLx6e669XwjHTHe3HuROe7C1oYMXuZbaU5PjOs"+lineFeed+
    "xSkyxtL2D00e/jWgufuNN4ftS+6XygEtB7j1g1vnCTVF1TLmtCRlY19kc2FfZGhf"+lineFeed+
    "MjU2IDxvcGVucGdwQGJyYWluaHViLm9yZz6IegQTEwgAIgUCTJPQrQIbAwYLCQgH"+lineFeed+
    "AwIGFQgCCQoLBBYCAwECHgECF4AACgkQC6Ut8LqlnZzmXQEAiKgiSzPSpUOJcX9d"+lineFeed+
    "JtLJ5As98Alit2oFwzhxG7mSVmQA/RP67yOeoUtdsK6bwmRA95cwf9lBIusNjehx"+lineFeed+
    "XDfpHj+/uFYETJPQrRIIKoZIzj0DAQcCAwR/cMCoGEzcrqXbILqP7Rfke977dE1X"+lineFeed+
    "XsRJEwrzftreZYrn7jXSDoiXkRyfVkvjPZqUvB5cknsaoH/3UNLRHClxAwEIB4hh"+lineFeed+
    "BBgTCAAJBQJMk9CtAhsMAAoJEAulLfC6pZ2c1yYBAOSUmaQ8rkgihnepbnpK7tNz"+lineFeed+
    "3QEocsLEtsTCDUBGNYGyAQDclifYqsUChXlWKaw3md+yHJPcWZXzHt37c4q/MhIm"+lineFeed+
    "oQ=="+lineFeed+
    "=hMzp"+lineFeed+
    "-----END PGP PUBLIC KEY BLOCK-----";
 
 PGPLib pgp = new PGPLib();
 String enc = pgp.encryptString("Hello World", inlinePubKey);
 
 String enc = pgp.encryptString("Hello World", "/usr/didisoft/keys/key.asc");

What’s next

In the next version we are gong to provide full support for OpenPGP emails (RFC 3156).

The DidiSoft Team