Summary description for OtherHashAlgAndValue.
OtherHashAlgAndValue ::= SEQUENCE { hashAlgorithm AlgorithmIdentifier, hashValue OtherHashValue } OtherHashValue ::= OCTET STRING
상속: Asn1Encodable
예제 #1
0
        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));
            }
        }
예제 #2
0
		public OtherHash(
			OtherHashAlgAndValue otherHash)
		{
			if (otherHash == null)
				throw new ArgumentNullException("otherHash");

			this.otherHash = otherHash;
		}
예제 #3
0
 public OtherHash(OtherHashAlgAndValue otherHash)
 {
     if (otherHash == null)
     {
         throw new ArgumentNullException("otherHash");
     }
     this.otherHash = otherHash;
 }
예제 #4
0
 public OtherHash(OtherHashAlgAndValue otherHash)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     if (otherHash == null)
     {
         throw new ArgumentNullException("otherHash");
     }
     this.otherHash = otherHash;
 }
예제 #5
0
 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)));
 }
예제 #6
0
		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();
			}
		}
예제 #7
0
 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);
     }
 }
예제 #8
0
 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();
     }
 }
예제 #9
0
		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);
			}
		}
예제 #10
0
 public SignaturePolicyId(DerObjectIdentifier sigPolicyIdentifier, OtherHashAlgAndValue sigPolicyHash, params SigPolicyQualifierInfo[] sigPolicyQualifiers)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     //IL_001c: Unknown result type (might be due to invalid IL or missing references)
     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);
     }
 }
예제 #11
0
 private SignaturePolicyId(Asn1Sequence seq)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0040: Unknown result type (might be due to invalid IL or missing references)
     if (seq == null)
     {
         throw new ArgumentNullException("seq");
     }
     if (seq.Count < 2 || seq.Count > 3)
     {
         throw new ArgumentException(string.Concat((object)"Bad sequence size: ", (object)seq.Count), "seq");
     }
     sigPolicyIdentifier = (DerObjectIdentifier)seq[0].ToAsn1Object();
     sigPolicyHash       = OtherHashAlgAndValue.GetInstance(seq[1].ToAsn1Object());
     if (seq.Count > 2)
     {
         sigPolicyQualifiers = (Asn1Sequence)seq[2].ToAsn1Object();
     }
 }
        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));
            }
        }
예제 #13
0
 public SignaturePolicyId(DerObjectIdentifier sigPolicyIdentifier, OtherHashAlgAndValue sigPolicyHash, global::System.Collections.IEnumerable sigPolicyQualifiers)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     //IL_001c: Unknown result type (might be due to invalid IL or missing references)
     //IL_004f: Unknown result type (might be due to invalid IL or missing references)
     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));
     }
 }
예제 #14
0
 public SignaturePolicyId(
     DerObjectIdentifier sigPolicyIdentifier,
     OtherHashAlgAndValue sigPolicyHash)
     : this(sigPolicyIdentifier, sigPolicyHash, null)
 {
 }
예제 #15
0
		public SignaturePolicyId(
			DerObjectIdentifier		sigPolicyIdentifier,
			OtherHashAlgAndValue	sigPolicyHash)
			: this(sigPolicyIdentifier, sigPolicyHash, null)
		{
		}