OpenPGP Library for Java version 2.5.5 has been released

OpenPGP Library for Java version 2.5.5 has been released

This release contains a few bug fixes and a lot of new features, including support for multiple files OpenPGP archives, a feature introduced in PGP Desktop Version 9.

Existing customers can download the updated version through our customers’ area. The evaluation version is available here.

Below is a list of the changes available in the current version (2.5.5):

[*] : Bug
[+] : New
[-] : Removed
[!] : Modification

New exceptions extending PGPException:

[+] Package com.didisoft.pgp.exceptions – containing exceptions that extend org.bouncycastle.openpgp.PGPException
[+] Added class com.didisoft.pgp.exceptions.WrongPrivateKeyException – exception to indicate that we have supplied a wrong decryption private key
[+] Added class com.didisoft.pgp.exceptions.WrongPasswordException – exception to indicate that we have supplied a wrong password
[+] Added class com.didisoft.pgp.exceptions.NoPrivateKeyFoundException – exception to indicate that a private key has not been found
[+] Added class com.didisoft.pgp.exceptions.NoPublicKeyFoundException – exception to indicate that a public key has not been found
[+] Added class com.didisoft.pgp.exceptions.FileIsEncryptedException – exception to indicate that a file is encrypted

Multiple files encryption:
When encrypting multiple files have in mind that only PGP Desktop 9+ and compatible software support this feature.

[+] Added method PGPLib.encryptFiles – for encryption of multiple files into a single OpenPGP file
[+] Added method PGPLib.decryptFileTo – decrypts multi file OpenPGP archive created with PGP Desktop 9+ into a folder
[+] Added method PGPLib.decryptStreamTo – decrypts multi file OpenPGP archive stream created with PGP Desktop 9+ into a folder

Decryption of password based encrypted (PBE) files:

[+] Added method PGPLib.decryptFilePBE – to decrypt password encrypted PGP files.

Changes:
[!] PGPLib.verifyStream – throws FileIsEncryptedException (extends PGPException) if the stream is also encrypted
[!] PGPLib.verifyFile – throws FileIsEncryptedException (extends PGPException) if the stream is also encrypted

[!] KeyStore is now Serializable
[!] KeyStore.exportPrivateKey – now throws NoPrivateKeyFoundException instead of PGPException
[!] KeyStore.exportPublicKey – now throws NoPublicKeyFoundException instead of PGPException
[+] Added method KeyStore.deletePrivateKey – deletes specified private key from the KeyStore
[+] Added method KeyStore.deletePublicKey – deletes specified public key from the KeyStore
[+] Added method KeyStore.containsPublicKey – returns true if a specified public key exists in this KeyStore
[+] Added method KeyStore.containsPrivateKey – returns true if a specified private key exists in this KeyStore

Bug fixes:

[*] PGPLib.verifyStream – now returns false if the supplied public key stream is not the matching this signed stream
[*] PGPLib.verifyFile – now returns false if the supplied public key stream is not the matching this signed stream
[*] PGPLib.decryptAndVerifyFile – now returns false if the supplied public key file is not the matching this signed file
[*] PGPLib.decryptAndVerifyStream – now returns false if the supplied public key file is not the matching this signed stream

If you have any comments or ideas regarding this release do not hesitate to drop us a line.