public SignaturePolicyId( DerObjectIdentifier sigPolicyIdentifier, OtherHashAlgAndValue sigPolicyHash, IEnumerable sigPolicyQualifiers) { if (sigPolicyIdentifier == null) { throw new ArgumentNullException("sigPolicyIdentifier"); } if (sigPolicyHash == null) { throw new ArgumentNullException("sigPolicyHash"); } this.sigPolicyIdentifier = sigPolicyIdentifier; this.sigPolicyHash = sigPolicyHash; if (sigPolicyQualifiers != null) { if (!CollectionUtilities.CheckElementsAreOfType(sigPolicyQualifiers, typeof(SigPolicyQualifierInfo))) { throw new ArgumentException("Must contain only 'SigPolicyQualifierInfo' objects", "sigPolicyQualifiers"); } this.sigPolicyQualifiers = new DerSequence( Asn1EncodableVector.FromEnumerable(sigPolicyQualifiers)); } }
public OtherHash( OtherHashAlgAndValue otherHash) { if (otherHash == null) throw new ArgumentNullException("otherHash"); this.otherHash = otherHash; }
public OtherHash( OtherHashAlgAndValue otherHash) { if (otherHash == null) { throw new ArgumentNullException("otherHash"); } this.otherHash = otherHash; }
private SignaturePolicyId( Asn1Sequence seq) { if (seq == null) throw new ArgumentNullException("seq"); if (seq.Count < 2 || seq.Count > 3) throw new ArgumentException("Bad sequence size: " + seq.Count, "seq"); this.sigPolicyIdentifier = (DerObjectIdentifier) seq[0].ToAsn1Object(); this.sigPolicyHash = OtherHashAlgAndValue.GetInstance(seq[1].ToAsn1Object()); if (seq.Count > 2) { this.sigPolicyQualifiers = (Asn1Sequence) seq[2].ToAsn1Object(); } }
public static OtherHash GetInstance( object obj) { if (obj == null || obj is OtherHash) { return((OtherHash)obj); } if (obj is Asn1OctetString) { return(new OtherHash((Asn1OctetString)obj)); } return(new OtherHash( OtherHashAlgAndValue.GetInstance(obj))); }
public SignaturePolicyId( DerObjectIdentifier sigPolicyIdentifier, OtherHashAlgAndValue sigPolicyHash, params SigPolicyQualifierInfo[] sigPolicyQualifiers) { if (sigPolicyIdentifier == null) throw new ArgumentNullException("sigPolicyIdentifier"); if (sigPolicyHash == null) throw new ArgumentNullException("sigPolicyHash"); this.sigPolicyIdentifier = sigPolicyIdentifier; this.sigPolicyHash = sigPolicyHash; if (sigPolicyQualifiers != null) { this.sigPolicyQualifiers = new DerSequence(sigPolicyQualifiers); } }
private SignaturePolicyId( Asn1Sequence seq) { if (seq == null) { throw new ArgumentNullException("seq"); } if (seq.Count < 2 || seq.Count > 3) { throw new ArgumentException("Bad sequence size: " + seq.Count, "seq"); } this.sigPolicyIdentifier = (DerObjectIdentifier)seq[0].ToAsn1Object(); this.sigPolicyHash = OtherHashAlgAndValue.GetInstance(seq[1].ToAsn1Object()); if (seq.Count > 2) { this.sigPolicyQualifiers = (Asn1Sequence)seq[2].ToAsn1Object(); } }
public SignaturePolicyId( DerObjectIdentifier sigPolicyIdentifier, OtherHashAlgAndValue sigPolicyHash, params SigPolicyQualifierInfo[] sigPolicyQualifiers) { if (sigPolicyIdentifier == null) { throw new ArgumentNullException("sigPolicyIdentifier"); } if (sigPolicyHash == null) { throw new ArgumentNullException("sigPolicyHash"); } this.sigPolicyIdentifier = sigPolicyIdentifier; this.sigPolicyHash = sigPolicyHash; if (sigPolicyQualifiers != null) { this.sigPolicyQualifiers = new DerSequence(sigPolicyQualifiers); } }
public SignaturePolicyId( DerObjectIdentifier sigPolicyIdentifier, OtherHashAlgAndValue sigPolicyHash) : this(sigPolicyIdentifier, sigPolicyHash, null) { }
public SignaturePolicyId( DerObjectIdentifier sigPolicyIdentifier, OtherHashAlgAndValue sigPolicyHash, IEnumerable sigPolicyQualifiers) { if (sigPolicyIdentifier == null) throw new ArgumentNullException("sigPolicyIdentifier"); if (sigPolicyHash == null) throw new ArgumentNullException("sigPolicyHash"); this.sigPolicyIdentifier = sigPolicyIdentifier; this.sigPolicyHash = sigPolicyHash; if (sigPolicyQualifiers != null) { if (!CollectionUtilities.CheckElementsAreOfType(sigPolicyQualifiers, typeof(SigPolicyQualifierInfo))) throw new ArgumentException("Must contain only 'SigPolicyQualifierInfo' objects", "sigPolicyQualifiers"); this.sigPolicyQualifiers = new DerSequence( Asn1EncodableVector.FromEnumerable(sigPolicyQualifiers)); } }