FileDocCategorySizeDatePackage
EnvelopedDataParser.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)2668Wed Oct 01 10:55:28 BST 2008org.bouncycastle.sasn1.cms

EnvelopedDataParser

public class EnvelopedDataParser extends Object
EnvelopedData ::= SEQUENCE {
version CMSVersion,
originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
recipientInfos RecipientInfos,
encryptedContentInfo EncryptedContentInfo,
unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
}
deprecated
use corresponding class in org.bouncycastle.asn1.cms

Fields Summary
private org.bouncycastle.sasn1.Asn1Sequence
_seq
private org.bouncycastle.sasn1.Asn1Integer
_version
private org.bouncycastle.sasn1.Asn1Object
_nextObject
Constructors Summary
public EnvelopedDataParser(org.bouncycastle.sasn1.Asn1Sequence seq)

        this._seq = seq;
        this._version = (Asn1Integer)seq.readObject();
    
Methods Summary
public org.bouncycastle.sasn1.Asn1SetgetCertificates()

        _nextObject = _seq.readObject();

        if (_nextObject instanceof Asn1TaggedObject && ((Asn1TaggedObject)_nextObject).getTagNumber() == 0)
        {
            Asn1Set certs = (Asn1Set)((Asn1TaggedObject)_nextObject).getObject(BerTag.SET, false);
            _nextObject = null;
            
            return certs;
        }
        
        return null;
    
public org.bouncycastle.sasn1.Asn1SetgetCrls()

        if (_nextObject == null)
        {
            _nextObject = _seq.readObject();
        }
        
        if (_nextObject instanceof Asn1TaggedObject && ((Asn1TaggedObject)_nextObject).getTagNumber() == 1)
        {
            Asn1Set crls = (Asn1Set)((Asn1TaggedObject)_nextObject).getObject(BerTag.SET, false);
            _nextObject = null;
            
            return crls;
        }
        
        return null;
    
public EncryptedContentInfoParsergetEncryptedContentInfo()

        return new EncryptedContentInfoParser((Asn1Sequence)_seq.readObject());
    
public org.bouncycastle.sasn1.Asn1SetgetRecipientInfos()

        return (Asn1Set)_seq.readObject();
    
public org.bouncycastle.sasn1.Asn1SetgetUnprotectedAttrs()

        Asn1Object o = _seq.readObject();
        
        if (o != null)
        {
            return (Asn1Set)((Asn1TaggedObject)o).getObject(BerTag.SET, false);
        }
        
        return null;
    
public org.bouncycastle.sasn1.Asn1IntegergetVersion()

        return _version;