org.bouncycastle.openpgp
Class PGPPBEEncryptedData
java.lang.Object
|
+--org.bouncycastle.openpgp.PGPEncryptedData
|
+--org.bouncycastle.openpgp.PGPPBEEncryptedData
- public class PGPPBEEncryptedData
- extends PGPEncryptedData
A password based encryption object.
PBE encrypted data objects can be decrypted
using a PBEDataDecryptorFactory
.
Method Summary |
int |
getAlgorithm()
Return the symmetric encryption algorithm that is used by the packet. |
java.io.InputStream |
getDataStream(org.bouncycastle.openpgp.operator.PBEDataDecryptorFactory dataDecryptorFactory)
Open an input stream which will provide the decrypted data protected by this object. |
java.io.InputStream |
getDataStream(org.bouncycastle.openpgp.operator.SessionKeyDataDecryptorFactory dataDecryptorFactory)
|
PGPSessionKey |
getSessionKey(org.bouncycastle.openpgp.operator.PBEDataDecryptorFactory dataDecryptorFactory)
Return the symmetric session key required to decrypt the data protected by this object. |
int |
getSymmetricAlgorithm(org.bouncycastle.openpgp.operator.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. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
getSymmetricAlgorithm
public int getSymmetricAlgorithm(org.bouncycastle.openpgp.operator.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 algorithm
used to
encrypt this object. - Throws:
- PGPException - if the session data cannot be recovered.
getSessionKey
public PGPSessionKey getSessionKey(org.bouncycastle.openpgp.operator.PBEDataDecryptorFactory dataDecryptorFactory)
throws PGPException
- Return the symmetric session key required to decrypt the data protected by this object.
- Parameters:
dataDecryptorFactory
- decryptor factory used to recover the session data.- Returns:
- session key
- Throws:
- PGPException - if the session data cannot be recovered
getDataStream
public java.io.InputStream getDataStream(org.bouncycastle.openpgp.operator.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.
getDataStream
public java.io.InputStream getDataStream(org.bouncycastle.openpgp.operator.SessionKeyDataDecryptorFactory dataDecryptorFactory)
throws PGPException
getVersion
public int getVersion()
- Description copied from class: PGPEncryptedData
- Return the version number of the Encrypted Session Key Packet.
- Overrides:
- getVersion in class PGPEncryptedData
- Tags copied from class: PGPEncryptedData
- Returns:
- version
getAlgorithm
public int getAlgorithm()
- Description copied from class: PGPEncryptedData
- Return the symmetric encryption algorithm that is used by the packet.
- Overrides:
- getAlgorithm in class PGPEncryptedData
- Tags copied from class: PGPEncryptedData
- Returns:
- algorithm