public CompressedDataParser( Asn1SequenceParser seq) { this._version = (DerInteger)seq.ReadObject(); this._compressionAlgorithm = AlgorithmIdentifier.GetInstance(seq.ReadObject().ToAsn1Object()); this._encapContentInfo = new ContentInfoParser((Asn1SequenceParser)seq.ReadObject()); }
protected CmsContentInfoParser( Stream data) { if (data == null) throw new ArgumentNullException("data"); this.data = data; try { Asn1StreamParser inStream = new Asn1StreamParser(data); this.contentInfo = new ContentInfoParser((Asn1SequenceParser)inStream.ReadObject()); } catch (IOException e) { throw new CmsException("IOException reading content.", e); } catch (InvalidCastException e) { throw new CmsException("Unexpected object reading content.", e); } }