org.bouncycastle.openpgp
Class PGPPublicKeyEncryptedData
java.lang.Object
org.bouncycastle.openpgp.PGPEncryptedData
org.bouncycastle.openpgp.PGPPublicKeyEncryptedData
- All Implemented Interfaces:
- SymmetricKeyAlgorithmTags
public class PGPPublicKeyEncryptedData
- extends PGPEncryptedData
A public key encrypted data object.
| Fields inherited from interface org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags |
AES_128, AES_192, AES_256, BLOWFISH, CAST5, DES, IDEA, NULL, SAFER, TRIPLE_DES, TWOFISH |
|
Method Summary |
java.io.InputStream |
getDataStream(PGPPrivateKey privKey,
java.lang.String provider)
Return the decrypted data stream for the packet. |
java.io.InputStream |
getDataStream(PGPPrivateKey privKey,
java.lang.String asymProvider,
java.lang.String provider)
Return the decrypted data stream for the packet. |
long |
getKeyID()
Return the keyID for the key used to encrypt the data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getKeyID
public long getKeyID()
- Return the keyID for the key used to encrypt the data.
- Returns:
- long
getDataStream
public java.io.InputStream getDataStream(PGPPrivateKey privKey,
java.lang.String provider)
throws PGPException,
java.security.NoSuchProviderException
- Return the decrypted data stream for the packet.
- Parameters:
privKey - private key to useprovider - provider to use for private key and symmetric key decryption.
- Returns:
- InputStream
- Throws:
PGPException
java.security.NoSuchProviderException
getDataStream
public java.io.InputStream getDataStream(PGPPrivateKey privKey,
java.lang.String asymProvider,
java.lang.String provider)
throws PGPException,
java.security.NoSuchProviderException
- Return the decrypted data stream for the packet.
- Parameters:
privKey - private key to use.asymProvider - asymetric provider to use with private key.provider - provider to use for symmetric algorithm.
- Returns:
- InputStream
- Throws:
PGPException
java.security.NoSuchProviderException