Inheritance: Asn1Encodable, IAsn1Choice
Exemplo n.º 1
0
		private CertifiedKeyPair(Asn1Sequence seq)
		{
			certOrEncCert = CertOrEncCert.GetInstance(seq[0]);

			if (seq.Count >= 2)
			{
				if (seq.Count == 2)
				{
					Asn1TaggedObject tagged = Asn1TaggedObject.GetInstance(seq[1]);
					if (tagged.TagNo == 0)
					{
						privateKey = EncryptedValue.GetInstance(tagged.GetObject());
					}
					else
					{
						publicationInfo = PkiPublicationInfo.GetInstance(tagged.GetObject());
					}
				}
				else
				{
					privateKey = EncryptedValue.GetInstance(Asn1TaggedObject.GetInstance(seq[1]));
					publicationInfo = PkiPublicationInfo.GetInstance(Asn1TaggedObject.GetInstance(seq[2]));
				}
			}
		}
Exemplo n.º 2
0
		public CertifiedKeyPair(
			CertOrEncCert		certOrEncCert,
			EncryptedValue		privateKey,
			PkiPublicationInfo	publicationInfo
		)
		{
			if (certOrEncCert == null)
				throw new ArgumentNullException("certOrEncCert");

			this.certOrEncCert = certOrEncCert;
			this.privateKey = privateKey;
			this.publicationInfo = publicationInfo;
		}
Exemplo n.º 3
0
 private CertifiedKeyPair(Asn1Sequence seq)
 {
     this.certOrEncCert = CertOrEncCert.GetInstance(seq[0]);
     if (seq.Count >= 2)
     {
         if (seq.Count == 2)
         {
             Asn1TaggedObject instance = Asn1TaggedObject.GetInstance(seq[1]);
             if (instance.TagNo == 0)
             {
                 this.privateKey = EncryptedValue.GetInstance(instance.GetObject());
                 return;
             }
             this.publicationInfo = PkiPublicationInfo.GetInstance(instance.GetObject());
             return;
         }
         else
         {
             this.privateKey      = EncryptedValue.GetInstance(Asn1TaggedObject.GetInstance(seq[1]));
             this.publicationInfo = PkiPublicationInfo.GetInstance(Asn1TaggedObject.GetInstance(seq[2]));
         }
     }
 }
Exemplo n.º 4
0
 public CertifiedKeyPair(CertOrEncCert certOrEncCert)
     : this(certOrEncCert, null, null)
 {
 }
Exemplo n.º 5
0
		public CertifiedKeyPair(
			CertOrEncCert certOrEncCert)
			: this(certOrEncCert, null, null)
		{
		}