Bouncy Castle Cryptography Library 1.44

org.bouncycastle.cms
Class PasswordRecipientInformation

java.lang.Object
  extended by org.bouncycastle.cms.RecipientInformation
      extended by org.bouncycastle.cms.PasswordRecipientInformation

public class PasswordRecipientInformation
extends RecipientInformation

the RecipientInfo class for a recipient who has been sent a message encrypted using a password.


Field Summary
 
Fields inherited from class org.bouncycastle.cms.RecipientInformation
data, encAlg, keyEncAlg, macAlg, rid
 
Constructor Summary
PasswordRecipientInformation(org.bouncycastle.asn1.cms.PasswordRecipientInfo info, org.bouncycastle.asn1.x509.AlgorithmIdentifier encAlg, org.bouncycastle.asn1.x509.AlgorithmIdentifier macAlg, java.io.InputStream data)
           
PasswordRecipientInformation(org.bouncycastle.asn1.cms.PasswordRecipientInfo info, org.bouncycastle.asn1.x509.AlgorithmIdentifier encAlg, java.io.InputStream data)
           
 
Method Summary
 CMSTypedStream getContentStream(java.security.Key key, java.security.Provider prov)
          decrypt the content and return an input stream.
 CMSTypedStream getContentStream(java.security.Key key, java.lang.String prov)
          decrypt the content and return an input stream.
 java.lang.String getKeyDerivationAlgOID()
          return the object identifier for the key derivation algorithm, or null if there is none present.
 java.security.AlgorithmParameters getKeyDerivationAlgParameters(java.security.Provider provider)
          return an AlgorithmParameters object representing the parameters to the key derivation algorithm to the recipient.
 java.security.AlgorithmParameters getKeyDerivationAlgParameters(java.lang.String provider)
          return an AlgorithmParameters object representing the parameters to the key derivation algorithm to the recipient.
 byte[] getKeyDerivationAlgParams()
          return the ASN.1 encoded key derivation algorithm parameters, or null if there aren't any.
 
Methods inherited from class org.bouncycastle.cms.RecipientInformation
getContent, getContent, getContentFromSessionKey, getKeyEncryptionAlgOID, getKeyEncryptionAlgorithmParameters, getKeyEncryptionAlgorithmParameters, getKeyEncryptionAlgParams, getMac, getRID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordRecipientInformation

public PasswordRecipientInformation(org.bouncycastle.asn1.cms.PasswordRecipientInfo info,
                                    org.bouncycastle.asn1.x509.AlgorithmIdentifier encAlg,
                                    java.io.InputStream data)

PasswordRecipientInformation

public PasswordRecipientInformation(org.bouncycastle.asn1.cms.PasswordRecipientInfo info,
                                    org.bouncycastle.asn1.x509.AlgorithmIdentifier encAlg,
                                    org.bouncycastle.asn1.x509.AlgorithmIdentifier macAlg,
                                    java.io.InputStream data)
Method Detail

getKeyDerivationAlgOID

public java.lang.String getKeyDerivationAlgOID()
return the object identifier for the key derivation algorithm, or null if there is none present.

Returns:
OID for key derivation algorithm, if present.

getKeyDerivationAlgParams

public byte[] getKeyDerivationAlgParams()
return the ASN.1 encoded key derivation algorithm parameters, or null if there aren't any.

Returns:
ASN.1 encoding of key derivation algorithm parameters.

getKeyDerivationAlgParameters

public java.security.AlgorithmParameters getKeyDerivationAlgParameters(java.lang.String provider)
                                                                throws java.security.NoSuchProviderException
return an AlgorithmParameters object representing the parameters to the key derivation algorithm to the recipient.

Returns:
AlgorithmParameters object, null if there aren't any.
Throws:
java.security.NoSuchProviderException

getKeyDerivationAlgParameters

public java.security.AlgorithmParameters getKeyDerivationAlgParameters(java.security.Provider provider)
return an AlgorithmParameters object representing the parameters to the key derivation algorithm to the recipient.

Returns:
AlgorithmParameters object, null if there aren't any.

getContentStream

public CMSTypedStream getContentStream(java.security.Key key,
                                       java.lang.String prov)
                                throws CMSException,
                                       java.security.NoSuchProviderException
decrypt the content and return an input stream.

Overrides:
getContentStream in class RecipientInformation
Throws:
CMSException
java.security.NoSuchProviderException

getContentStream

public CMSTypedStream getContentStream(java.security.Key key,
                                       java.security.Provider prov)
                                throws CMSException
decrypt the content and return an input stream.

Specified by:
getContentStream in class RecipientInformation
Throws:
CMSException

Bouncy Castle Cryptography Library 1.44