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 |
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
getSymmetricAlgorithm
public int getSymmetricAlgorithm(PGPPrivateKey privKey,
java.lang.String provider)
throws PGPException,
java.security.NoSuchProviderException
- Return the algorithm code for the symmetric algorithm used to encrypt the data.
- Returns:
- integer algorithm code
- Throws:
PGPException
java.security.NoSuchProviderException
getSymmetricAlgorithm
public int getSymmetricAlgorithm(PGPPrivateKey privKey,
java.security.Provider provider)
throws PGPException,
java.security.NoSuchProviderException
- Throws:
PGPException
java.security.NoSuchProviderException
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.security.Provider provider)
throws PGPException
- Throws:
PGPException
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
getDataStream
public java.io.InputStream getDataStream(PGPPrivateKey privKey,
java.security.Provider asymProvider,
java.security.Provider provider)
throws PGPException
- Throws:
PGPException