Bouncy Castle Cryptography Library 1.47

org.bouncycastle.openpgp
Class PGPPublicKeyEncryptedData

java.lang.Object
  extended by org.bouncycastle.openpgp.PGPEncryptedData
      extended by org.bouncycastle.openpgp.PGPPublicKeyEncryptedData
All Implemented Interfaces:
SymmetricKeyAlgorithmTags

public class PGPPublicKeyEncryptedData
extends PGPEncryptedData

A public key encrypted data object.


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, CAST5, DES, IDEA, NULL, SAFER, TRIPLE_DES, TWOFISH
 
Method Summary
 java.io.InputStream getDataStream(PGPPrivateKey privKey, java.security.Provider provider)
          Deprecated. use method that takes a PublicKeyDataDecryptorFactory
 java.io.InputStream getDataStream(PGPPrivateKey privKey, java.security.Provider asymProvider, java.security.Provider provider)
          Deprecated. use method that takes a PublicKeyDataDecryptorFactory
 java.io.InputStream getDataStream(PGPPrivateKey privKey, java.lang.String provider)
          Deprecated. use method that takes a PublicKeyDataDecryptorFactory
 java.io.InputStream getDataStream(PGPPrivateKey privKey, java.lang.String asymProvider, java.lang.String provider)
          Deprecated. use method that takes a PublicKeyDataDecryptorFactory
 java.io.InputStream getDataStream(PublicKeyDataDecryptorFactory dataDecryptorFactory)
          Open an input stream which will provide the decrypted data protected by this object.
 long getKeyID()
          Return the keyID for the key used to encrypt the data.
 int getSymmetricAlgorithm(PGPPrivateKey privKey, java.security.Provider provider)
          Deprecated. use the method taking a PublicKeyDataDecryptorFactory
 int getSymmetricAlgorithm(PGPPrivateKey privKey, java.lang.String provider)
          Deprecated. use the method taking a PublicKeyDataDecryptorFactory
 int getSymmetricAlgorithm(PublicKeyDataDecryptorFactory 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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
Deprecated. use the method taking a PublicKeyDataDecryptorFactory

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
Deprecated. use the method taking a PublicKeyDataDecryptorFactory

Throws:
PGPException
java.security.NoSuchProviderException

getSymmetricAlgorithm

public int getSymmetricAlgorithm(PublicKeyDataDecryptorFactory 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 integer encryption algorithm code.
Throws:
PGPException - if the session data cannot be recovered.

getDataStream

public java.io.InputStream getDataStream(PGPPrivateKey privKey,
                                         java.lang.String provider)
                                  throws PGPException,
                                         java.security.NoSuchProviderException
Deprecated. use method that takes a PublicKeyDataDecryptorFactory

Return the decrypted data stream for the packet.

Parameters:
privKey - private key to use
provider - 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
Deprecated. use method that takes a PublicKeyDataDecryptorFactory

Parameters:
privKey -
provider -
Returns:
Throws:
PGPException

getDataStream

public java.io.InputStream getDataStream(PGPPrivateKey privKey,
                                         java.lang.String asymProvider,
                                         java.lang.String provider)
                                  throws PGPException,
                                         java.security.NoSuchProviderException
Deprecated. use method that takes a PublicKeyDataDecryptorFactory

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
Deprecated. use method that takes a PublicKeyDataDecryptorFactory

Throws:
PGPException

getDataStream

public java.io.InputStream getDataStream(PublicKeyDataDecryptorFactory 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 input stream
Throws:
PGPException - if the session data cannot be recovered or the stream cannot be created.

Bouncy Castle Cryptography Library 1.47