"景先生毕设|www.jxszl.com

C# CmsProcessable类代码示例

2023-12-29 17:44编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中CmsProcessable类的典型用法代码示例。如果您正苦于以下问题:C#CmsProcessable类的具体用法?C#CmsProcessable怎么用?C#CmsProcessable使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:Generate /** *GenerateanobjectthatcontainsanCMSCompressedData */ publicCmsCompressedDataGenerate( CmsProcessable content, string compressionOid) { AlgorithmIdentifiercomAlgId; Asn1OctetStringcomOcts; try { MemoryStreambOut=newMemoryStream(); ZOutputStreamzOut=newZOutputStream(bOut,JZlib.Z_DEFAULT_COMPRESSION); content.Write(zOut); zOut.Dispose(); comAlgId=newAlgorithmIdentifier(newDerObjectIdentifier(compressionOid)); comOcts=newBerOctetString(bOut.ToArray()); } catch(IOExceptione) { thrownewCmsException("exceptionencodingdata.",e); } ContentInfocomContent=newContentInfo(CmsObjectIdentifiers.Data,comOcts); ContentInfocontentInfo=newContentInfo( CmsObjectIdentifiers.CompressedData, newCompressedData(comAlgId,comContent)); returnnewCmsCompressedData(contentInfo); }
原文链接:http://www.jxszl.com/biancheng/C/556788.html