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; }
public static AuthenticatedData GetInstance(Asn1TaggedObject obj, bool isExplicit) { return(AuthenticatedData.GetInstance(Asn1Sequence.GetInstance(obj, isExplicit))); }