Inheritance: Asn1Encodable
Esempio n. 1
0
		public MetaData(
			DerBoolean		hashProtected,
			DerUtf8String	fileName,
			DerIA5String	mediaType,
			Attributes		otherMetaData)
		{
			this.hashProtected = hashProtected;
			this.fileName = fileName;
			this.mediaType = mediaType;
			this.otherMetaData = otherMetaData;
		}
Esempio n. 2
0
 public EnvelopedData(
     OriginatorInfo originatorInfo,
     Asn1Set recipientInfos,
     EncryptedContentInfo encryptedContentInfo,
     Attributes unprotectedAttrs)
 {
     this.version = new DerInteger(CalculateVersion(originatorInfo, recipientInfos, Asn1Set.GetInstance(unprotectedAttrs)));
     this.originatorInfo = originatorInfo;
     this.recipientInfos = recipientInfos;
     this.encryptedContentInfo = encryptedContentInfo;
     this.unprotectedAttrs = Asn1Set.GetInstance(unprotectedAttrs);
 }
Esempio n. 3
0
 public SignerInfo(
     SignerIdentifier        sid,
     AlgorithmIdentifier     digAlgorithm,
     Attributes              authenticatedAttributes,
     AlgorithmIdentifier     digEncryptionAlgorithm,
     Asn1OctetString         encryptedDigest,
     Attributes              unauthenticatedAttributes)
 {
     this.version = new DerInteger(sid.IsTagged ? 3 : 1);
     this.sid = sid;
     this.digAlgorithm = digAlgorithm;
     this.authenticatedAttributes = Asn1Set.GetInstance(authenticatedAttributes);
     this.digEncryptionAlgorithm = digEncryptionAlgorithm;
     this.encryptedDigest = encryptedDigest;
     this.unauthenticatedAttributes = Asn1Set.GetInstance(unauthenticatedAttributes);
 }
Esempio n. 4
0
		private MetaData(Asn1Sequence seq)
		{
			this.hashProtected = DerBoolean.GetInstance(seq[0]);

			int index = 1;

			if (index < seq.Count && seq[index] is DerUtf8String)
			{
				this.fileName = DerUtf8String.GetInstance(seq[index++]);
			}
			if (index < seq.Count && seq[index] is DerIA5String)
			{
				this.mediaType = DerIA5String.GetInstance(seq[index++]);
			}
			if (index < seq.Count)
			{
				this.otherMetaData = Attributes.GetInstance(seq[index++]);
			}
		}
		public AttributeTable(
			Attributes attrs)
			: this(Asn1Set.GetInstance(attrs.ToAsn1Object()))
		{
		}
Esempio n. 6
0
 public AttributeTable(
     Attributes attrs)
     : this(Asn1Set.GetInstance(attrs.ToAsn1Object()))
 {
 }
Esempio n. 7
0
 public SignerInfo(SignerIdentifier sid, AlgorithmIdentifier digAlgorithm, Attributes authenticatedAttributes, AlgorithmIdentifier digEncryptionAlgorithm, Asn1OctetString encryptedDigest, Attributes unauthenticatedAttributes)
 {
     version                        = new DerInteger((!sid.IsTagged) ? 1 : 3);
     this.sid                       = sid;
     this.digAlgorithm              = digAlgorithm;
     this.authenticatedAttributes   = Asn1Set.GetInstance(authenticatedAttributes);
     this.digEncryptionAlgorithm    = digEncryptionAlgorithm;
     this.encryptedDigest           = encryptedDigest;
     this.unauthenticatedAttributes = Asn1Set.GetInstance(unauthenticatedAttributes);
 }