kz.gamma.cms
Class RecipientInformation

java.lang.Object
  extended by kz.gamma.cms.RecipientInformation
Direct Known Subclasses:
KEKRecipientInformation, KeyAgreeRecipientInformation, KeyTransRecipientInformation, PasswordRecipientInformation

public abstract class RecipientInformation
extends java.lang.Object


Field Summary
protected  java.io.InputStream _data
           
protected  AlgorithmIdentifier _encAlg
           
protected  AlgorithmIdentifier _keyEncAlg
           
protected  RecipientId _rid
           
private static ASN1Null asn1Null
           
 
Constructor Summary
protected RecipientInformation(AlgorithmIdentifier encAlg, AlgorithmIdentifier keyEncAlg, java.io.InputStream data)
           
 
Method Summary
private  byte[] encodeObj(DEREncodable obj)
           
 byte[] getContent(java.security.Key key, java.lang.String provider)
           
protected  CMSTypedStream getContentFromSessionKey(java.security.Key sKey, java.lang.String provider)
           
abstract  CMSTypedStream getContentStream(java.security.Key key, java.lang.String provider)
           
 java.lang.String getKeyEncryptionAlgOID()
          return the object identifier for the key encryption algorithm.
 java.security.AlgorithmParameters getKeyEncryptionAlgorithmParameters(java.lang.String provider)
          Return an AlgorithmParameters object giving the encryption parameters used to encrypt the key this recipient holds.
 byte[] getKeyEncryptionAlgParams()
          return the ASN.1 encoded key encryption algorithm parameters, or null if there aren't any.
 RecipientId getRID()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

asn1Null

private static final ASN1Null asn1Null

_rid

protected RecipientId _rid

_encAlg

protected AlgorithmIdentifier _encAlg

_keyEncAlg

protected AlgorithmIdentifier _keyEncAlg

_data

protected java.io.InputStream _data
Constructor Detail

RecipientInformation

protected RecipientInformation(AlgorithmIdentifier encAlg,
                               AlgorithmIdentifier keyEncAlg,
                               java.io.InputStream data)
Method Detail

getRID

public RecipientId getRID()

encodeObj

private byte[] encodeObj(DEREncodable obj)
                  throws java.io.IOException
Throws:
java.io.IOException

getKeyEncryptionAlgOID

public java.lang.String getKeyEncryptionAlgOID()
return the object identifier for the key encryption algorithm.

Returns:
OID for key encryption algorithm.

getKeyEncryptionAlgParams

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

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

getKeyEncryptionAlgorithmParameters

public java.security.AlgorithmParameters getKeyEncryptionAlgorithmParameters(java.lang.String provider)
                                                                      throws CMSException,
                                                                             java.security.NoSuchProviderException
Return an AlgorithmParameters object giving the encryption parameters used to encrypt the key this recipient holds.

Parameters:
provider - the provider to generate the parameters for.
Returns:
the parameters object, null if there is not one.
Throws:
CMSException - if the algorithm cannot be found, or the parameters can't be parsed.
java.security.NoSuchProviderException - if the provider cannot be found.

getContentFromSessionKey

protected CMSTypedStream getContentFromSessionKey(java.security.Key sKey,
                                                  java.lang.String provider)
                                           throws CMSException,
                                                  java.security.NoSuchProviderException
Throws:
CMSException
java.security.NoSuchProviderException

getContent

public byte[] getContent(java.security.Key key,
                         java.lang.String provider)
                  throws CMSException,
                         java.security.NoSuchProviderException
Throws:
CMSException
java.security.NoSuchProviderException

getContentStream

public abstract CMSTypedStream getContentStream(java.security.Key key,
                                                java.lang.String provider)
                                         throws CMSException,
                                                java.security.NoSuchProviderException
Throws:
CMSException
java.security.NoSuchProviderException


Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.