org.webdocwf.util.smime.cms
Class KeyTransRecipientInfo

java.lang.Object
  |
  +--org.webdocwf.util.smime.der.DERObject
        |
        +--org.webdocwf.util.smime.der.DERSequencePr
              |
              +--org.webdocwf.util.smime.cms.KeyTransRecipientInfo

public class KeyTransRecipientInfo
extends DERSequencePr

KeyTransRecipientInfo class is DER encoded object represented in ASN.1 notation according to RFC2630. It is used for representing information about particular recipient and for transport encrypted symmetric key. This class presents one way of transport symmetric key (they are two more ways). KeyTransRecipientInfo information in ASN.1 notation is represented as element named RecipientInfo (withouth s at the end!) which is inner element of RecipientInfos (for details look at RecipientInfo class).

KeyTransRecipientInfo ::= SEQUENCE {
version CMSVersion, -- always set to 0 or 2
rid RecipientIdentifier,
keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
encryptedKey EncryptedKey }


Constructor Summary
KeyTransRecipientInfo(byte[] symKey0)
          Symmetric key is only important parameter, other can be null.
 
Method Summary
 void addRecipient(java.security.cert.X509Certificate recip0)
          Adds recipient information.
 
Methods inherited from class org.webdocwf.util.smime.der.DERSequencePr
addContent
 
Methods inherited from class org.webdocwf.util.smime.der.DERObject
getContentOctets, getContentPartSize, getDEREncoded, getIdentifierOctet, getLengthOctets, getLengthPartSize, getTagClassType, getTagComplexity, getTagTypeNumber, getTotalSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyTransRecipientInfo

public KeyTransRecipientInfo(byte[] symKey0)
                      throws SMIMEException
Symmetric key is only important parameter, other can be null.
Parameters:
symKey0 - symmetric key represented as byte array
parameter0 - for future use
Throws:
SMIMEException - thrown by super class constructor.
Method Detail

addRecipient

public void addRecipient(java.security.cert.X509Certificate recip0)
                  throws SMIMEException
Adds recipient information. This method can be used just one time in one instance of this class.
Parameters:
recip0 - X509 certificate of the recipient
Throws:
SMIMEException - if recipient was already added. Also, exception could be thrown by super class addContent method.


Copyright © 2002-2002 Together Teamlösungen. All Rights Reserved.