public class PGPPBEEncryptedData extends PGPSymmetricKeyEncryptedData
PBE encrypted data objects can be decrypted
using a PBEDataDecryptorFactory
.
PGPEncryptedData.TruncatedStream
AES_128, AES_192, AES_256, BLOWFISH, CAMELLIA_128, CAMELLIA_192, CAMELLIA_256, CAST5, DES, IDEA, NULL, SAFER, TRIPLE_DES, TWOFISH
EAX, GCM, OCB
Modifier and Type | Method and Description |
---|---|
int |
getAlgorithm()
Symmetric-key algorithm used by this object to protect the session key
(
getSymmetricAlgorithm(PBEDataDecryptorFactory) with. |
java.io.InputStream |
getDataStream(PBEDataDecryptorFactory dataDecryptorFactory)
Open an input stream which will provide the decrypted data protected by this object.
|
java.io.InputStream |
getDataStream(SessionKeyDataDecryptorFactory dataDecryptorFactory)
Deprecated.
will be removed in 1.74, use PGPEncryptedDataList.extractSessionKeyEncryptedData() and then apply the dataDecryptorFactory.
|
PGPSessionKey |
getSessionKey(PBEDataDecryptorFactory dataDecryptorFactory)
Return the symmetric session key required to decrypt the data protected by this object.
|
int |
getSymmetricAlgorithm(PBEDataDecryptorFactory dataDecryptorFactory)
Return the symmetric key algorithm required to decrypt the data protected by this object.
|
int |
getVersion()
Return the version number of the Encrypted Session Key Packet.
|
createDecryptionStream
getInputStream, isAEAD, isIntegrityProtected, verify
public int getVersion()
PGPEncryptedData
getVersion
in class PGPEncryptedData
public int getAlgorithm()
getSymmetricAlgorithm(PBEDataDecryptorFactory)
with.getAlgorithm
in class PGPEncryptedData
SymmetricKeyAlgorithmTags
)public int getSymmetricAlgorithm(PBEDataDecryptorFactory dataDecryptorFactory) throws PGPException
dataDecryptorFactory
- decryptor factory to use to recover the session data.SymmetricKeyAlgorithmTags
)PGPException
- if the session data cannot be recovered.public PGPSessionKey getSessionKey(PBEDataDecryptorFactory dataDecryptorFactory) throws PGPException
dataDecryptorFactory
- decryptor factory used to recover the session data.PGPException
- if the session data cannot be recoveredpublic java.io.InputStream getDataStream(PBEDataDecryptorFactory dataDecryptorFactory) throws PGPException
dataDecryptorFactory
- decryptor factory to use to recover the session data and provide
the stream.PGPException
- if the session data cannot be recovered or the stream cannot be created.public java.io.InputStream getDataStream(SessionKeyDataDecryptorFactory dataDecryptorFactory) throws PGPException
PGPException