Uses of Class
com.didisoft.pgp.PGPException

Packages that use PGPException
com.didisoft.pgp OpenPGP Library for Java 
com.didisoft.pgp.exceptions Custom Exceptions 
com.didisoft.pgp.inspect OpenPGP inspection API (Advanced) 
 

Uses of PGPException in com.didisoft.pgp
 

Methods in com.didisoft.pgp that throw PGPException
 void KeyStore.addCertification(long keyId, long certKeyId, java.lang.String certPassword, java.lang.String userID)
          Appends certification to a given OpenPGP key in the key store.
 void KeyStore.addUserId(long keyId, java.lang.String privateKeyPassword, java.lang.String newUserId)
          Appends an additional User Id signature to a key contained in this key store.
 void RevocationLib.assignDesignatedRevoker(KeyStore keyStore, long keyId, java.lang.String privateKeyPassword, long revokerKeyId)
          Authorizes the specified key as designated revoker for this key.
 void RevocationLib.assignDesignatedRevoker(KeyStore keyStore, java.lang.String userId, java.lang.String privateKeyPassword, java.lang.String revokerUserId)
          Authorizes the specified key as designated revoker for this key.
 void RevocationLib.assignDesignatedRevoker(java.lang.String publicKeyFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String revokerPublicKeyFileName)
          Authorizes the specified key as a designated revoker for this key.
 void KeyStore.changePrimaryUserId(long keyId, java.lang.String privateKeyPassword, java.lang.String newUserId)
          Changes the primary (first) user Id signature of a key with a new user Id


Example usage:
Check the file KeyStoreChangeUserId.java located in the examples folder in the library archive.
 void KeyStore.changePrivateKeyPassword(long keyId, java.lang.String oldPassword, java.lang.String newPassword)
          Changes private key password.
 void PGPKeyPair.changePrivateKeyPassword(java.lang.String oldPassword, java.lang.String newPassword)
          Changes the password of this private key.
 boolean KeyStore.changePrivateKeyPassword(java.lang.String userId, java.lang.String oldPassword, java.lang.String newPassword)
          Changes private key password.
 boolean KeyStore.changeUserId(long keyId, java.lang.String privateKeyPassword, java.lang.String oldUserId, java.lang.String newUserId)
          Changes an existing user Id signature of a key with a new user Id


Example usage:
Check the file KeyStoreChangeUserId.java located in the examples folder in the library archive.
 void PGPLib.clearSignFile(java.lang.String inputFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String hashingAlgorithm, java.lang.String outputFileName)
          OpenPGP clear signs a file.
 void PGPLib.clearSignFileVersion3(java.lang.String inputFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String hashingAlgorithm, java.lang.String outputFileName)
          OpenPGP clear signs a file, using OpenPGP version 3 signature format (old format used by PGP 2.x)

Use when needed compatibility with PGP 2.x

GPG equivalent command: gpg --force-v3-sigs --clearsign inputFileName

Example:

 java.lang.String PGPLib.clearSignString(java.lang.String stringToSign, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String hashingAlgorithm)
          OpenPGP clear signs a String

Example usage:

 java.lang.String PGPLib.clearSignStringVersion3(java.lang.String stringToSign, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String hashingAlgorithm)
          OpenPGP clear signs a String, using OpenPGP version 3 signature format (the old format)

Use when needed compatibility with PGP 2.x and PGP 5.x systems.
 void RevocationLib.createRevocationCertificateInFile(KeyStore keyStore, long keyId, java.lang.String privateKeyPassword, byte reason, java.lang.String description, java.lang.String outputFileName)
          Creates a key revocation certificate for a given OpenPGP key located in a KeyStore and stores it in a file.
 void RevocationLib.createRevocationCertificateInFile(KeyStore keyStore, java.lang.String userId, java.lang.String privateKeyPassword, byte reason, java.lang.String description, java.lang.String outputFileName)
          Creates a key revocation certificate for a given OpenPGP key located in a KeyStore and stores it in a file.
 void RevocationLib.createRevocationCertificateInFile(java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, byte reason, java.lang.String description, java.lang.String outputFileName)
          Creates a key revocation certificate for a given OpenPGP key file and stores it in a file.
 java.lang.String RevocationLib.createRevocationCertificateText(KeyStore keyStore, long keyId, java.lang.String privateKeyPassword, byte reason, java.lang.String description)
          Creates a revocation certificate for a given OpenPGP key in ASCII armored string format.
 java.lang.String RevocationLib.createRevocationCertificateText(KeyStore keyStore, java.lang.String userId, java.lang.String privateKeyPassword, byte reason, java.lang.String description)
          Creates a revocation certificate for a given OpenPGP key in ASCII armored string format.
 java.lang.String RevocationLib.createRevocationCertificateText(java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, byte reason, java.lang.String description)
          Creates a revocation certificate in ASCII armored string format for a given OpenPGP key.
 boolean PGPLib.decryptAndVerifyFile(java.lang.String encryptedFileName, KeyStore keyStore, java.lang.String privateKeyPassword, java.lang.String outputFileName)
          Decrypts and verifies one pass encrypted and signed OpenPGP file
Supports OpenPGP version 3 format too (used by PGP 6.5 and below).
 boolean PGPLib.decryptAndVerifyFile(java.lang.String encryptedFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFile, java.lang.String outputFileName)
          Decrypts and verifies an OpenPGP encrypted and signed file
Supports OpenPGP version 3 format too (used by PGP(r) 5 and below).
 boolean PGPLib.decryptAndVerifyFileTo(java.lang.String encryptedFileName, KeyStore keyStore, java.lang.String privateKeyPassword, java.lang.String outputFolder)
          Decrypts and verifies one pass encrypted and signed OpenPGP file
Supports OpenPGP version 3 format too (used by PGP 6.5 and below).
 boolean PGPLib.decryptAndVerifyFileTo(java.lang.String encryptedFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFile, java.lang.String outputFolder)
          Decrypts and verifies an OpenPGP encrypted and signed file to a folder
This methods is very suitable for multi file PGP archives.
 boolean PGPLib.decryptAndVerifyStream(java.io.InputStream encryptedStream, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.InputStream publicKeyStream, java.io.OutputStream outputStream)
          Decrypts and verifies OpenPGP encrypted and signed stream.
 boolean PGPLib.decryptAndVerifyStream(java.io.InputStream encryptedStream, KeyStore keyStore, java.lang.String privateKeyPassword, java.io.OutputStream outputStream)
          Decrypts and verifies OpenPGP encrypted and signed stream.
 boolean PGPLib.decryptAndVerifyStreamTo(java.io.InputStream encryptedStream, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.InputStream publicKeyStream, java.lang.String outputFolder)
          Decrypts and verifies OpenPGP encrypted and signed stream.
 boolean PGPLib.decryptAndVerifyStreamTo(java.io.InputStream encryptedStream, KeyStore keyStore, java.lang.String privateKeyPassword, java.lang.String outputFolder)
          Decrypts and verifies OpenPGP encrypted and signed stream.
 boolean PGPLib.decryptAndVerifyString(java.lang.String message, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFileName, java.lang.StringBuffer decryptedString)
          Decrypts and verifies an OpenPGP one pass signed end encrypted message.
 boolean PGPLib.decryptAndVerifyString(java.lang.String message, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFileName, java.lang.StringBuffer decryptedString, java.lang.String charsetName)
          Decrypts and verifies an OpenPGP one pass signed end encrypted message.
 java.lang.String PGPLib.decryptFile(java.lang.String encryptedFileName, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.lang.String outputFileName)
          Decrypts an OpenPGP encrypted file using Private key input stream.
 java.lang.String PGPLib.decryptFile(java.lang.String encryptedFileName, KeyStore pgpKeyStore, java.lang.String privateKeyPassword, java.lang.String outputFileName)
          Decrypts an OpenPGP encrypted file using key from a OpenPGP key store.
 java.lang.String PGPLib.decryptFile(java.lang.String encryptedFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String outputFileName)
          Decrypts an OpenPGP encrypted file using Private key file.
 java.lang.String PGPLib.decryptFilePBE(java.lang.String encryptedFileName, java.lang.String decryptionPassword, java.lang.String outputFileName)
          Decrypts an OpenPGP file that was encrypted with password (PBE, symmetric key encrypted).
 java.lang.String[] PGPLib.decryptFileTo(java.lang.String encryptedFileName, KeyStore keyStore, java.lang.String privateKeyPassword, java.lang.String outputFolder)
          Decrypts the content of an OpenPGP encrypted file into a folder.
 java.lang.String[] PGPLib.decryptFileTo(java.lang.String encryptedFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String outputFolder)
          Decrypts the content of an OpenPGP encrypted file into a folder.
 java.lang.String PGPLib.decryptStream(java.io.InputStream encryptedStream, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.OutputStream outputStream)
          Decrypts an OpenPGP encrypted stream using Private key input stream.
 java.lang.String PGPLib.decryptStream(java.io.InputStream encryptedStream, KeyStore pgpKeyStore, java.lang.String privateKeyPassword, java.io.OutputStream outputStream)
          Decrypts an OpenPGP encrypted stream using a private key supplied as an input stream.
 java.lang.String[] PGPLib.decryptStreamTo(java.io.InputStream encryptedStream, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.lang.String outputFolder)
          Decrypts an OpenPGP encrypted stream to a specified folder.
 java.lang.String[] PGPLib.decryptStreamTo(java.io.InputStream encryptedStream, KeyStore keyStore, java.lang.String privateKeyPassword, java.lang.String outputFolder)
          Decrypts an OpenPGP encrypted stream to a specified folder.
 void KeyStore.deleteKeyPair(long keyId)
          Deletes public and private key pair from this key store that have the specified Key Id.
 boolean KeyStore.deleteKeyPair(java.lang.String userId)
          Deletes the first public and private key pair from this key store that have the specified User Id.
 boolean KeyStore.deletePrivateKey(long keyId)
          Deletes the first private key with the specified User Id from this KeyStore.
 boolean KeyStore.deletePrivateKey(java.lang.String userId)
          Deletes the first private key with the specified User Id from this KeyStore.
 boolean KeyStore.deletePublicKey(long keyId)
          Deletes the first public key with the specified Key Id from this KeyStore.
 boolean KeyStore.deletePublicKey(java.lang.String userId)
          Deletes the first public key with the specified User Id from this KeyStore.
 boolean KeyStore.deleteUserId(long keyId, java.lang.String userId)
          Removes a user Id signature from a key


Example usage:
Check the file KeyStoreChangeUserId.java located in the examples folder in the library archive.
 void PGPLib.detachedSignFile(java.lang.String dataFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String detachedSignatureFileName, boolean asciiArmor)
          Creates an OpenPGP detached signature for a given data stream contents.
 void PGPLib.detachedSignStream(java.io.InputStream dataStream, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.OutputStream outStream, boolean asciiArmor)
          Creates an OpenPGP detached signature for a given data stream contents.
 void PGPLib.detachedSignStream(java.io.InputStream dataStream, KeyStore keyStore, long keyId, java.lang.String privateKeyPassword, java.io.OutputStream outStream, boolean asciiArmor)
          Creates an OpenPGP detached signature for a given data stream contents.
 void PGPLib.detachedSignStream(java.io.InputStream dataStream, KeyStore keyStore, java.lang.String userId, java.lang.String privateKeyPassword, java.io.OutputStream outStream, boolean asciiArmor)
          Creates an OpenPGP detached signature for a given data stream contents.
 boolean PGPLib.detachedVerifyStream(java.io.InputStream dataFileStream, java.io.InputStream detachedSignatureStream, java.io.InputStream publicKeyStream)
          Verifies that an OpenPGP detached signature is signed from a trusted sender.
 boolean PGPLib.detachedVerifyStream(java.io.InputStream dataFileStream, java.io.InputStream detachedSignatureStream, KeyStore keyStore)
          Verifies that an OpenPGP detached signature is signed from a trusted sender.
 void PGPLib.encryptFile(java.lang.String dataFileName, java.io.InputStream publicKeyStream, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts given file using the first available public key from a key ring input stream

Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)

Example:

 void PGPLib.encryptFile(java.lang.String dataFileName, KeyStore keyStore, long[] recipientsKeyIds, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts a file for multiple recipients.


Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)

Example:
 void PGPLib.encryptFile(java.lang.String dataFileName, KeyStore keyStore, long keyId, java.lang.String outputFileName)
          OpenPGP encrypts given file using specified public key, stored in specified OpenPGP key store.
 void PGPLib.encryptFile(java.lang.String dataFileName, KeyStore keyStore, long keyId, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts given file using specified public key, stored in specified OpenPGP key store.
 void PGPLib.encryptFile(java.lang.String dataFileName, KeyStore keyStore, java.lang.String[] recipientsUserIds, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts a file for multiple recipients.


Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)

Example:

 void PGPLib.encryptFile(java.lang.String dataFileName, KeyStore keyStore, java.lang.String userId, java.lang.String outputFileName)
          OpenPGP encrypts given file using specified public key, stored in specified OpenPGP key store.
 void PGPLib.encryptFile(java.lang.String dataFileName, KeyStore keyStore, java.lang.String userId, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts given file using specified public key, stored in specified OpenPGP key store.
 void PGPLib.encryptFile(java.lang.String dataFileName, java.lang.String[] publicKeysFileNames, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts a file for multiple recipients.


Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)

Example usage:

 void PGPLib.encryptFile(java.lang.String dataFileName, java.lang.String publicKeyFileName, java.lang.String outputFileName, boolean asciiArmor)
          OpenPGP encrypts given file using the public key of the recipient.
 void PGPLib.encryptFile(java.lang.String dataFileName, java.lang.String publicKeyFileName, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts given file using the public key of the recipient.
 void PGPLib.encryptFilePBE(java.lang.String dataFileName, java.lang.String password, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          Encrypts a file with a passphrase.
The same passphrase is used to decrypt the file

Equivalent GnuPG command:
gpg -c -e [dataFileName]

Compression algorithm used is the one specified with PGPLib.setCompression(String) if supported by the public key, otherwise the first supported by the key algorithm is used.
 void PGPLib.encryptFilePBE(java.lang.String dataFileName, java.lang.String publicKeyFileName, java.lang.String alternativePassword, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          Encrypts a file with a public key and a passphrase.
The passphrase can be used to decrypt the file if the corresponding private key is lost.
 void PGPLib.encryptFiles(java.lang.String[] dataFileNames, KeyStore keyStore, long[] recipientsKeyIds, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts multiple files into one OpenPGP archive

Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)

Example usage:

 void PGPLib.encryptFiles(java.lang.String[] dataFileNames, KeyStore keyStore, java.lang.String[] recipientsUserIds, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts multiple files into one OpenPGP archive

Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)

Example:

 void PGPLib.encryptFiles(java.lang.String[] dataFileNames, java.lang.String[] publicKeysFileNames, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts multiple files into one OpenPGP archive.
 void PGPLib.encryptFiles(java.lang.String[] dataFileNames, java.lang.String publicKeyFileName, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts multiple files into one OpenPGP archive.
 void PGPLib.encryptStream(java.io.InputStream dataStream, java.lang.String fileName, java.io.InputStream publicKeyStream, java.io.OutputStream outputStream, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts an input stream using the first available Public key from a Key ring input stream

Compression algorithm used is the one specified with PGPLib.setCompression(String) if supported by the public key, otherwise the first supported by the key algorithm is used.
 void PGPLib.encryptStream(java.io.InputStream dataStream, java.lang.String fileName, KeyStore keyStore, long keyId, java.io.OutputStream out, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts input stream using a recipient public key located in a KeyStore

Compression algorithm used is the one specified with PGPLib.setCompression(String) if supported by the public key, otherwise the first supported by the key algorithm is used.
 void PGPLib.encryptStream(java.io.InputStream dataStream, java.lang.String fileName, KeyStore keyStore, java.lang.String userId, java.io.OutputStream out, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP Encrypts Input Stream using a Public key located in a KeyStore

Compression algorithm used is the one specified with PGPLib.setCompression(String) if supported by the public key, otherwise the first supported by the key algorithm is used.
 void PGPLib.encryptStream(java.io.InputStream dataStream, java.lang.String fileName, long streamLength, java.io.InputStream publicKeyStream, java.io.OutputStream out, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts an input stream using the first available public key supplied as an input stream

Compression algorithm used is the one specified with PGPLib.setCompression(String) if supported by the public key, otherwise the first supported by the key algorithm is used.
 void PGPLib.encryptStream(java.io.InputStream dataStream, java.lang.String fileName, long streamLength, java.lang.String publicKeyFileName, java.io.OutputStream out, boolean asciiArmor)
          OpenPGP encrypts stream using the first available public key from a key ring file.
 void PGPLib.encryptStream(java.io.InputStream dataStream, java.lang.String fileName, long streamLength, java.lang.String publicKeyFileName, java.io.OutputStream out, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts stream using the first available public key from a key ring file.
 void PGPLib.encryptStream(java.io.InputStream dataStream, java.lang.String fileName, PGPKeyPair publicKey, java.io.OutputStream outputStream, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP encrypts an input stream using the first available Public key from a Key ring input stream

Compression algorithm used is the one specified with PGPLib.setCompression(String) if supported by the public key, otherwise the first supported by the key algorithm is used.
 void PGPLib.encryptStreamPBE(java.io.InputStream dataStream, java.lang.String fileNameLabel, java.lang.String password, java.io.OutputStream out, boolean asciiArmor, boolean withIntegrityCheck)
          Encrypts an input stream with a password based OpenPGP encryption (PBE)

Compression algorithm used is the one specified with PGPLib.setCompression(String) if supported by the public key, otherwise the first supported by the key algorithm is used.
static PGPKeyPair PGPKeyPair.generateEccKeyPair(java.lang.String ecCurve, java.lang.String userId, java.lang.String password)
          Generates an OpenPGP key pair with Elliptic Curve cryptography (ECC) asymmetric encryption algorithm

Note: The generated key pair has no expiration date
 KeyPairInformation KeyStore.generateEccKeyPair(java.lang.String ecCurve, java.lang.String userId, java.lang.String privateKeyPassword)
          Generates an OpenPGP key pair with Elliptic Curve cryptography (ECC) asymmetric encryption algorithm

Default algorithms for the key are:
Symmetric cipher: AES-256, AES-192, AES-128
Hash: SHA-512, SHA-384, SHA-256
Compression: ZIP, ZLIB, BZIP2, Uncompressed
 KeyPairInformation KeyStore.generateEccKeyPair(java.lang.String ecCurve, java.lang.String userId, java.lang.String privateKeyPassword, long expirationAfterDays)
          Generates an OpenPGP key pair with Elliptic Curve cryptography (ECC) asymmetric encryption algorithm

Default algorithms for the key are:
Symmetric cipher: AES-256, AES-192, AES-128
Hash: SHA-512, SHA-384, SHA-256
Compression: ZIP, ZLIB, BZIP2, Uncompressed
static PGPKeyPair PGPKeyPair.generateEccKeyPair(java.lang.String ecCurve, java.lang.String userId, java.lang.String password, java.lang.String[] compressionTypes, java.lang.String[] hashingAlgorithmTypes, java.lang.String[] cipherTypes)
          Generates an OpenPGP key pair with Elliptic Curve cryptography (ECC) asymmetric encryption algorithm

Note: The generated key pair has no expiration date
 KeyPairInformation KeyStore.generateEccKeyPair(java.lang.String ecCurve, java.lang.String userId, java.lang.String privateKeyPassword, java.lang.String[] compressionTypes, java.lang.String[] hashingAlgorithmTypes, java.lang.String[] cipherTypes)
          Generates an OpenPGP key pair with Elliptic Curve cryptography (ECC) asymmetric encryption algorithm

Note: The generated key pair has no expiration date
static PGPKeyPair PGPKeyPair.generateEccKeyPair(java.lang.String ecCurve, java.lang.String userId, java.lang.String password, java.lang.String[] compressionTypes, java.lang.String[] hashingAlgorithmTypes, java.lang.String[] cipherTypes, long expirationAfterDays)
          Generates an OpenPGP key pair with Elliptic Curve cryptography (ECC) asymmetric encryption algorithm
 KeyPairInformation KeyStore.generateEccKeyPair(java.lang.String ecCurve, java.lang.String userId, java.lang.String privateKeyPassword, java.lang.String[] compressionTypes, java.lang.String[] hashingAlgorithmTypes, java.lang.String[] cipherTypes, long expirationAfterDays)
          Generates an OpenPGP key pair with Elliptic Curve cryptography (ECC) asymmetric encryption algorithm
static PGPKeyPair PGPKeyPair.generateElGamalKeyPair(int keySize, java.lang.String userId, java.lang.String password)
          Generates OpenPGP Key pair with ElGamal (DH/DSS) encryption and predefined values for compression, hashing and cypher like the ones generated with PGP Desktop(tm) key generation wizard.
 KeyPairInformation KeyStore.generateElGamalKeyPair(int keySize, java.lang.String userId, java.lang.String password)
          Generates OpenPGP Key pair with ElGamal (DH/DSS) encryption and predefined values for compression, hashing and cypher like the ones generated with PGP Desktop(tm) key generation wizard.
 KeyPairInformation KeyStore.generateKeyPair(int keySize, java.lang.String userId, java.lang.String password)
          Generates OpenPGP Key pair with RSA encryption and predefined values for compression, hashing and cypher like the ones generated with PGP Desktop(tm) key generation wizard.
 KeyPairInformation KeyStore.generateKeyPair(int keySize, java.lang.String userId, java.lang.String keyAlgorithm, java.lang.String password, java.lang.String[] compressionTypes, java.lang.String[] hashingAlgorithmTypes, java.lang.String[] cipherTypes)
          Generates OpenPGP key pair (public and private key).
static PGPKeyPair PGPKeyPair.generateKeyPair(int keySize, java.lang.String userId, java.lang.String keyAlgorithm, java.lang.String password, java.lang.String[] compressionTypes, java.lang.String[] hashingAlgorithmTypes, java.lang.String[] cipherTypes, long expirationAfterDays)
          Generates an OpenPGP key pair (public and private key).
 KeyPairInformation KeyStore.generateKeyPair(int keySize, java.lang.String userId, java.lang.String keyAlgorithm, java.lang.String password, java.lang.String[] compressionTypes, java.lang.String[] hashingAlgorithmTypes, java.lang.String[] cipherTypes, long expirationAfterDays)
          Generates OpenPGP key pair (public and private key).
 KeyPairInformation KeyStore.generateKeyPair(int keySize, java.lang.String userId, java.lang.String keyAlgorithm, java.lang.String password, java.lang.String compressionTypes, java.lang.String hashingAlgorithmTypes, java.lang.String cipherTypes)
          Generates OpenPGP Key pair (public and private key).
 KeyPairInformation KeyStore.generateKeyPair(int keySize, java.lang.String userId, java.lang.String keyAlgorithm, java.lang.String password, java.lang.String compressionTypes, java.lang.String hashingAlgorithmTypes, java.lang.String cipherTypes, long expirationAfterDays)
          Generates OpenPGP Key pair (public and private key).
static PGPKeyPair PGPKeyPair.generateRsaKeyPair(int keySize, java.lang.String userId, java.lang.String password)
          Generates OpenPGP Key pair with RSA encryption and predefined values for compression, hashing and cypher like the ones generated with PGP Desktop(tm) key generation wizard.
 KeyPairInformation KeyStore.generateRsaKeyPair(int keySize, java.lang.String userId, java.lang.String password)
          Generates OpenPGP Key pair with RSA encryption and predefined values for compression, hashing and cypher like the ones generated with PGP Desktop(tm) key generation wizard.
 KeyPairInformation[] KeyStore.importKeyRing(java.io.InputStream keyStream)
          Imports OpenPGP key ring stream into this KeyStore instance.
 KeyPairInformation[] KeyStore.importKeyRing(java.io.InputStream keyStream, java.lang.String privateKeyPassword)
          Imports OpenPGP key ring stream into this KeyStore instance.
 KeyPairInformation[] KeyStore.importKeyRing(java.lang.String keyRingFileName)
          Imports OpenPGP key ring into this KeyStore instance.
 KeyPairInformation[] KeyStore.importKeyRing(java.lang.String keyRingFileName, java.lang.String privateKeyPassword)
          Imports OpenPGP key ring into this KeyStore instance.
 KeyPairInformation[] KeyStore.importKeyStore(KeyStore keyStore)
          Imports the keys contained in another KeyStore object into the current instance.
 KeyPairInformation[] KeyStore.importPrivateKey(java.io.InputStream privateKeyStream)
          Imports private key stream into this KeyStore instance.
 KeyPairInformation[] KeyStore.importPrivateKey(java.io.InputStream privateKeyStream, java.lang.String password)
          Imports private key stream into this KeyStore instance.
 KeyPairInformation[] KeyStore.importPrivateKey(java.lang.String privateKeyFileName)
          Imports a private key file into this KeyStore instance.
 KeyPairInformation[] KeyStore.importPrivateKey(java.lang.String privateKeyFileName, java.lang.String password)
          Imports private key file into this KeyStore instance.
 KeyPairInformation[] KeyStore.importPublicKey(java.io.InputStream publicKeyStream)
          Imports an OpenPGP public key into this KeyStore instance.
 KeyPairInformation[] KeyStore.importPublicKey(java.lang.String publicKeyFileName)
          Imports an OpenPGP public key into this KeyStore instance.
 void KeyStore.importPublickKey(java.lang.String publicKeyFileName)
          Deprecated. Replaced by KeyStore.importPublicKey(String)
 boolean KeyStore.isTrusted(long keyId)
          Returns is a public key with the supplied Key Id trusted in this key store.
 boolean KeyStore.isTrusted(java.lang.String keyUserId)
          Returns is a public key with the supplied Key User Id trusted in this key store.
 void KeyStore.loadFromStream(java.io.InputStream keystoreStream)
          Loads the KeyStore data from a stream, where it has been stored previously
 void KeyStore.loadFromStream(java.io.InputStream keysStream, java.lang.String password)
          Loads the KeyStore data from a stream, where it has been stored previously.
static KeyStore KeyStore.openFile(java.lang.String filename, java.lang.String password)
          Initializes a new Key Store object.
 void KeyStore.purge()
          Clears the internal state of this key store.
 void RevocationLib.revokeKey(KeyStore keyStore, long keyId, java.lang.String privateKeyPassword, byte reason, java.lang.String description)
          Revokes a public key or sub key from a KeyStore.
 void RevocationLib.revokeKey(KeyStore keyStore, java.lang.String userId, java.lang.String privateKeyPassword, byte reason, java.lang.String description)
          Revokes a public key or sub key from a KeyStore.
 void RevocationLib.revokeKey(java.lang.String publicKeyFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, byte reason, java.lang.String description)
          Revokes a public key.
 void RevocationLib.revokeKeyWithDesignatedRevoker(KeyStore keyStore, long keyId, long revokerKeyId, java.lang.String revokerPassword, byte reason, java.lang.String description)
          Revokes an OpenPGP public key located in a KeyStore with a designated revoker.
 void RevocationLib.revokeKeyWithDesignatedRevoker(KeyStore keyStore, java.lang.String userId, java.lang.String revokerUserId, java.lang.String revokerPassword, byte reason, java.lang.String description)
          Revokes an OpenPGP public key located in a KeyStore with a designated revoker.
 void RevocationLib.revokeKeyWithDesignatedRevoker(java.lang.String publicKeyFileName, java.lang.String revokerPrivateKeyFileName, java.lang.String revokerPassword, byte reason, java.lang.String description)
          Revokes an OpenPGP public key with a designated revoker private key file.
 void RevocationLib.revokeKeyWithRevocationCertificateFile(KeyStore keyStore, java.lang.String certificateFileName)
          Revokes a key or subkey from an OpenPGP key ring located in a KeyStore.
 void RevocationLib.revokeKeyWithRevocationCertificateFile(java.lang.String publicKeyFileName, java.lang.String certificateFileName)
          Revokes a key or subkey from an OpenPGP key ring file (*.asc, *.pkr) using a revocation certificate file.
 void RevocationLib.revokeKeyWithRevocationCertificateText(KeyStore keyStore, java.lang.String certificateText)
          Revokes a key or subkey located in an OpenPGP KeyStore using a revocation certificate supplied as text.
 void RevocationLib.revokeKeyWithRevocationCertificateText(java.lang.String publicKeyFileName, java.lang.String certificateText)
          Revokes a key or subkey from an OpenPGP key ring file (*.asc, *.pkr) using a revocation certificate supplied as text.
 void RevocationLib.revokeUserIdSignature(KeyStore keyStore, long keyId, java.lang.String userId, java.lang.String privateKeyPassword, byte reason, java.lang.String description)
          Revokes a User Id signature binding from an OpenPGP public key located in a KeyStore
Note: the corresponding private key must also exist in this KeyStore in order the signature to be produced.
 void RevocationLib.revokeUserIdSignature(KeyStore keyStore, java.lang.String userId, java.lang.String privateKeyPassword, byte reason, java.lang.String description)
          Revokes a User Id signature binding from an OpenPGP public key located in a KeyStore
Note: if more than one key has this User ID signature use @link RevocationLib.revokeUserIdSignature(KeyStore, long, String, String, byte, String) instead

Equivalent GPG command:
gpg --edit-key [userId]
revsig
 void RevocationLib.revokeUserIdSignature(java.lang.String publicKeyFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String userId, byte reason, java.lang.String description)
          Revokes a User Id signature binding from an OpenPGP public key file.
 void KeyStore.save()
          Saves the backing file of this KeyStore instance to disk.
 void KeyStore.setTrust(long keyId, byte trustValue)
          Sets an internal trust value for a public key, valid only in this KeyStore instance

PGP command line (r) equivalent:
pgp --set-trust keyId --trust trustValue
 void KeyStore.setTrust(java.lang.String keyUserId, byte trustValue)
          Sets an internal trust value for a public key, valid only in this KeyStore instance

PGP command line (r) equivalent:
pgp --set-trust keyUserId --trust trustValue
 void PGPLib.signAndEncryptFile(java.lang.String fileName, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.InputStream publicKeyStream, java.io.OutputStream outputStream, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass.
 void PGPLib.signAndEncryptFile(java.lang.String fileName, KeyStore keyStore, long signKeyId, java.lang.String privateKeyPassword, long[] encKeyIds, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass for multiple recipients.
 void PGPLib.signAndEncryptFile(java.lang.String fileName, KeyStore keyStore, long signKeyId, java.lang.String privateKeyPassword, long encKeyId, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass.
 void PGPLib.signAndEncryptFile(java.lang.String fileName, KeyStore keyStore, java.lang.String signUserId, java.lang.String privateKeyPassword, java.lang.String[] encUserIds, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass for multiple recipients.
 void PGPLib.signAndEncryptFile(java.lang.String fileName, KeyStore keyStore, java.lang.String signUserId, java.lang.String privateKeyPassword, java.lang.String encUserId, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass.
 void PGPLib.signAndEncryptFile(java.lang.String dataFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String[] publicKeyFiles, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass.
 void PGPLib.signAndEncryptFile(java.lang.String dataFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFile, java.lang.String outputFileName, boolean asciiArmor)
          OpenPGP signs and encrypts a file in one pass.
 void PGPLib.signAndEncryptFile(java.lang.String dataFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFile, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass.
 void PGPLib.signAndEncryptFileVersion3(java.lang.String dataFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFile, java.lang.String outputFileName, boolean asciiArmor)
          OpenPGP signs and encrypts a file in one pass, using OpenPGP version 3 signature format (compatible with PGP 6.5 and below)

(Note that this is not the same as first encrypt and then sign a file, because in that case a double compression is performed.)
Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)
Hashing algorithm used is the one specified with PGPLib.setHash(String)

Example:
 void PGPLib.signAndEncryptFileVersion3(java.lang.String dataFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFile, java.lang.String outputFileName, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass, using OpenPGP version 3 signature format (compatible with PGP 6.5 and below)

(Note that this is not the same as first encrypt and then sign a file, because in that case a double compression is performed.)
Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)
Hashing algorithm used is the one specified with PGPLib.setHash(String)

Example:
 void PGPLib.signAndEncryptStream(java.io.InputStream dataFileStream, java.lang.String internalFileName, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.InputStream[] publicKeyStreams, java.io.OutputStream outputStream, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a stream in one pass.
 void PGPLib.signAndEncryptStream(java.io.InputStream dataFileStream, java.lang.String internalFileName, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.InputStream publicKeyStream, java.io.OutputStream outputStream, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a stream in one pass.
 void PGPLib.signAndEncryptStream(java.io.InputStream dataFileStream, java.lang.String internalFileName, KeyStore keyStore, java.lang.String signUserId, java.lang.String privateKeyPassword, java.lang.String encUserId, java.io.OutputStream outputStream, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass.
 void PGPLib.signAndEncryptStreamVersion3(java.io.InputStream dataFileStream, java.lang.String internalFileName, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.InputStream publicKeyStream, java.io.OutputStream outputStream, boolean asciiArmor)
          OpenPGP signs and encrypts a file in one pass, using OpenPGP version 3 signature format (compatible with PGP 6.5 and below)
(Note that this is not the same as first encrypt and then sign a file, because in that case a double compression is performed.)
Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)
Hashing algorithm used is the one specified with PGPLib.setHash(String)

Example:
 void PGPLib.signAndEncryptStreamVersion3(java.io.InputStream dataFileStream, java.lang.String internalFileName, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.InputStream publicKeyStream, java.io.OutputStream outputStream, boolean asciiArmor, boolean withIntegrityCheck)
          OpenPGP signs and encrypts a file in one pass, using OpenPGP version 3 signature format (compatible with older PGP 2.x systems)
(Note that this is not the same as first encrypt and then sign a file, because in that case a double compression is performed.)
Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)
Hashing algorithm used is the one specified with PGPLib.setHash(String)

Example:
 java.lang.String PGPLib.signAndEncryptString(java.lang.String stringToEncrypt, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFileName)
          OpenPGP signs and encrypts a String message in one pass
The input String is assumed to be UTF-8 encoded.
 java.lang.String PGPLib.signAndEncryptString(java.lang.String stringToEncrypt, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFileName, java.lang.String charsetName)
          OpenPGP signs and encrypts a String message in one pass
Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)
Hashing algorithm used is the one specified with PGPLib.setHash(String)

Example:
 java.lang.String PGPLib.signAndEncryptStringVersion3(java.lang.String stringToEncrypt, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFileName)
          OpenPGP signs and encrypts a String message in one pass with OpenPGP version 3 signatures
The input String is assumed to be UTF-8 encoded.
 java.lang.String PGPLib.signAndEncryptStringVersion3(java.lang.String stringToEncrypt, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String publicKeyFileName, java.lang.String charsetName)
          OpenPGP signs and encrypts a String message in one pass creating OpenPGP version 3 signatures
Compression algorithm used is the one specified with PGPLib.setCompression(String)
Symmetric cipher algorithm used is the one specified with PGPLib.setCypher(String)
Hashing algorithm used is the one specified with PGPLib.setHash(String)

Example:
 void PGPLib.signFile(KeyStore keyStore, java.lang.String dataFileName, long privateKeyId, java.lang.String privateKeyPassword, java.lang.String outputFileName)
          OpenPGP signs given file using specified Private Key, using OpenPGP Key Store.
 void PGPLib.signFile(KeyStore keyStore, java.lang.String dataFileName, java.lang.String keyIdHex, java.lang.String privateKeyPassword, java.lang.String outputFileName)
          OpenPGP signs given file using specified Private Key, using OpenPGP Key Store.
 void PGPLib.signFile(java.lang.String fileName, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.OutputStream out, boolean asciiArmor)
          OpenPGP signs a file.
 void PGPLib.signFile(java.lang.String dataFileName, KeyStore keyStore, long privateKeyId, java.lang.String privateKeyPassword, java.lang.String outputFileName, boolean asciiArmor)
          OpenPGP signs a file, with private key stored in a KeyStore object.
 void PGPLib.signFile(java.lang.String dataFileName, KeyStore keyStore, java.lang.String privateKeyUserId, java.lang.String privateKeyPassword, java.lang.String outputFileName, boolean asciiArmor)
          OpenPGP signs a file, with private key stored in a KeyStore object.
 void PGPLib.signFile(java.lang.String inputFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String outputFileName, boolean asciiArmor)
          OpenPGP signs a file.
 void PGPLib.signFileVersion3(java.lang.String fileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword, java.lang.String outputFileName, boolean asciiArmor)
          Signs a file in OpenPGP version 3 format (compatible with PGP 2.x systems)

Optional settings:
Compression algorithm used is the one specified with PGPLib.setCompression(String)
Hashing algorithm used is the one specified with PGPLib.setHash(String)

Example usage:

 void KeyStore.signPublicKey(long keyId, long signKeyId, java.lang.String signPassword)
          Signs a public key with a private key.
 void KeyStore.signPublicKey(java.lang.String keyUserId, java.lang.String signKeyUserId, java.lang.String signPassword)
          Signs a public key with a private key.
 void KeyStore.signPublicKeyAsTrustedIntroducer(long keyId, long signKeyId, java.lang.String signPassword)
          Signs a public key as trusted introducer

When you import keys into your KeyStore and are sure that the trusted third party is really the person they claim to be, you can sign his/her keys.
 void KeyStore.signPublicKeyAsTrustedIntroducer(java.lang.String keyUserId, java.lang.String signKeyUserId, java.lang.String signPassword)
          Signs a public key as a trusted introducer with a private key.
 void PGPLib.signStream(java.io.InputStream dataInputStream, java.lang.String fileNameLabel, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.OutputStream signedStream, boolean asciiArmor)
          OpenPGP signs a stream.
 void PGPLib.signStream(java.io.InputStream dataInputStream, java.lang.String fileNameLabel, KeyStore keyStore, long signingKeyId, java.lang.String privateKeyPassword, java.io.OutputStream signedStream, boolean asciiArmor)
          OpenPGP signs stream with a private key stored in a KeyStore.
 void PGPLib.signStream(java.io.InputStream dataInputStream, java.lang.String fileNameLabel, KeyStore keyStore, java.lang.String signingKeyUserId, java.lang.String privateKeyPassword, java.io.OutputStream signedStream, boolean asciiArmor)
          OpenPGP signs stream with a private key stored in a KeyStore.
 void PGPLib.signStreamVersion3(java.io.InputStream dataFileStream, java.lang.String internalFileName, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword, java.io.OutputStream out, boolean asciiArmor)
          Signs a stream using OpenPGP version 3 signatures format (compatible with PGP 2.x systems)

Optional settings:
Compression algorithm used is the one specified with PGPLib.setCompression(String)
Hashing algorithm used is the one specified with PGPLib.setHash(String)

Example:
 boolean PGPLib.verifyFile(java.io.InputStream dataFileStream, java.io.InputStream publicKeyStream)
          Deprecated. Use PGPLib.verifyStream(InputStream, InputStream)
 boolean PGPLib.verifyFile(java.lang.String dataFileName, KeyStore keyStore, java.lang.String outputFileName)
          Verifies the incoming file as being correctly signed.
 boolean PGPLib.verifyFile(java.lang.String dataFileName, java.lang.String publicKeyFileName)
          Verifies the incoming file as being correctly signed.
 boolean PGPLib.verifyFile(java.lang.String dataFileName, java.lang.String publicKeyFileName, java.lang.String outputFileName)
          Verifies the incoming file as being correctly signed.
 boolean PGPLib.verifyStream(java.io.InputStream dataFileStream, java.io.InputStream publicKeyStream)
          Verifies the incoming stream as being correctly signed.
 boolean PGPLib.verifyStream(java.io.InputStream dataFileStream, java.io.InputStream publicKeyStream, java.io.OutputStream outputFileStream)
          Verifies the incoming stream as being correctly signed.
 boolean PGPLib.verifyStream(java.io.InputStream dataFileStream, KeyStore keyStore, java.io.OutputStream outputFileStream)
          Verifies the incoming stream as being correctly signed.
 boolean PGPLib.verifyString(java.lang.String message, java.lang.String publicKeyFileName, java.lang.StringBuffer decryptedString)
          Verifies an OpenPGP signed only message.
 boolean PGPLib.verifyString(java.lang.String message, java.lang.String publicKeyFileName, java.lang.StringBuffer decryptedString, java.lang.String charsetName)
          Verifies an OpenPGP signed only message.
 

Constructors in com.didisoft.pgp that throw PGPException
KeyStore(java.lang.String keystoreFileName, java.lang.String keystorePassword)
          Creates a new Key Store object backed by a file.
 

Uses of PGPException in com.didisoft.pgp.exceptions
 

Subclasses of PGPException in com.didisoft.pgp.exceptions
 class DetachedSignatureException
          Internal exception indicating that an OpenPGP file contains detached signature
 class FileIsEncryptedException
          Exception that indicates that a file is encrypted.
 class FileIsPBEEncryptedException
          Exception that indicates that a file is encrypted with a password (PBE, password based encryption).
 class IntegrityCheckException
          Exception that indicates that the data is corrupted.
 class KeyIsExpiredException
          Exception that indicates that a supplied key is expired.
 class KeyIsRevokedException
          Exception that indicates that a supplied key is revoked.
 class NonPGPDataException
          Exception that indicates that a supplied data is not a valid OpenPGP message.
 class NoPrivateKeyFoundException
          Exception that indicates that a private key has not been found in a supplied file/stream parameter.
 class NoPublicKeyFoundException
          Exception that indicates that a public key has not been found in a supplied file/stream parameter.
 class WrongPasswordException
          This exception indicates that we have supplied a wrong password for an OpenPGP private key.
 class WrongPrivateKeyException
          This exception indicates that we have supplied a wrong decryption private key for an OpenPGP archive.
 

Uses of PGPException in com.didisoft.pgp.inspect
 

Methods in com.didisoft.pgp.inspect that throw PGPException
 boolean PGPInspectLib.isSignedOnly(java.io.InputStream dataStream)
          Checks is a given OpenPGP archive stream signed only
 boolean PGPInspectLib.isSignedOnly(java.lang.String fileName)
          Checks is a given OpenPGP archive signed only
 ContentItem[] PGPInspectLib.listOpenPGPFile(java.lang.String signedFileName)
          Lists the contents of an OpenPGP signed file

Example:
 ContentItem[] PGPInspectLib.listOpenPGPFile(java.lang.String fileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword)
          Lists the contents of an OpenPGP encrypted file

Example:
 ContentItem[] PGPInspectLib.listOpenPGPStream(java.io.InputStream signedStream)
          Lists the contents of an OpenPGP signed stream

Example:
 ContentItem[] PGPInspectLib.listOpenPGPStream(java.io.InputStream encryptedStream, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword)
          Lists the contents of an OpenPGP encrypted stream

Example:
 long[] PGPInspectLib.listSigningKeyIds(java.io.InputStream dataStream)
          Returns the Key Id's that have signed a given OpenPGP signed only archive
 long[] PGPInspectLib.listSigningKeyIds(java.io.InputStream encryptedStream, java.io.InputStream privateKeyStream, java.lang.String privateKeyPassword)
          Returns a list of the Key Id's for the key(s) that have encrypted a given OpenPGP archive
 long[] PGPInspectLib.listSigningKeyIds(java.lang.String dataFileName)
          Returns the Key Id's that have signed a given OpenPGP signed only archive
 long[] PGPInspectLib.listSigningKeyIds(java.lang.String dataFileName, java.lang.String privateKeyFileName, java.lang.String privateKeyPassword)
          Returns the Key Id's that have signed a given OpenPGP archive
 



Copyright © 2006-2013 DidiSoft Ltd. All Rights Reserved.