Inheritance: Asn1Encodable
Esempio n. 1
0
 public AuthenticatedData(OriginatorInfo originatorInfo, Asn1Set recipientInfos, AlgorithmIdentifier macAlgorithm, AlgorithmIdentifier digestAlgorithm, ContentInfo encapsulatedContent, Asn1Set authAttrs, Asn1OctetString mac, Asn1Set unauthAttrs)
 {
     if ((digestAlgorithm != null || authAttrs != null) && (digestAlgorithm == null || authAttrs == null))
     {
         throw new ArgumentException("digestAlgorithm and authAttrs must be set together");
     }
     this.version                 = new DerInteger(AuthenticatedData.CalculateVersion(originatorInfo));
     this.originatorInfo          = originatorInfo;
     this.macAlgorithm            = macAlgorithm;
     this.digestAlgorithm         = digestAlgorithm;
     this.recipientInfos          = recipientInfos;
     this.encapsulatedContentInfo = encapsulatedContent;
     this.authAttrs               = authAttrs;
     this.mac         = mac;
     this.unauthAttrs = unauthAttrs;
 }
Esempio n. 2
0
 public static AuthenticatedData GetInstance(Asn1TaggedObject obj, bool isExplicit)
 {
     return(AuthenticatedData.GetInstance(Asn1Sequence.GetInstance(obj, isExplicit)));
 }