Package org.bouncycastle.openpgp
Class PGPPBEEncryptedData
- java.lang.Object
-
- org.bouncycastle.openpgp.PGPEncryptedData
-
- org.bouncycastle.openpgp.PGPPBEEncryptedData
-
- All Implemented Interfaces:
SymmetricKeyAlgorithmTags
public class PGPPBEEncryptedData extends PGPEncryptedData
A password based encryption object.PBE encrypted data objects can be
decryptedusing aPBEDataDecryptorFactory.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bouncycastle.openpgp.PGPEncryptedData
PGPEncryptedData.TruncatedStream
-
-
Field Summary
-
Fields inherited from interface org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags
AES_128, AES_192, AES_256, BLOWFISH, CAMELLIA_128, CAMELLIA_192, CAMELLIA_256, CAST5, DES, IDEA, NULL, SAFER, TRIPLE_DES, TWOFISH
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetDataStream(PBEDataDecryptorFactory dataDecryptorFactory)Open an input stream which will provide the decrypted data protected by this object.intgetSymmetricAlgorithm(PBEDataDecryptorFactory dataDecryptorFactory)Return the symmetric key algorithm required to decrypt the data protected by this object.-
Methods inherited from class org.bouncycastle.openpgp.PGPEncryptedData
getInputStream, isIntegrityProtected, verify
-
-
-
-
Method Detail
-
getSymmetricAlgorithm
public int getSymmetricAlgorithm(PBEDataDecryptorFactory dataDecryptorFactory) throws PGPException
Return the symmetric key algorithm required to decrypt the data protected by this object.- Parameters:
dataDecryptorFactory- decryptor factory to use to recover the session data.- Returns:
- the identifier of the
encryption algorithmused to encrypt this object. - Throws:
PGPException- if the session data cannot be recovered.
-
getDataStream
public java.io.InputStream getDataStream(PBEDataDecryptorFactory dataDecryptorFactory) throws PGPException
Open an input stream which will provide the decrypted data protected by this object.- Parameters:
dataDecryptorFactory- decryptor factory to use to recover the session data and provide the stream.- Returns:
- the resulting decrypted input stream, probably containing a sequence of PGP data objects.
- Throws:
PGPException- if the session data cannot be recovered or the stream cannot be created.
-
-