Ejemplo n.º 1
0
		/// <summary>
		/// Encode ASN.1 class members to specified buffer. 
		///
		/// NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.
		/// </summary>
		/// <param name="Buffer">Output buffer</param>
        public override void Encode (Goedel.ASN1.Buffer Buffer) {
			int Position = Buffer.Encode__Sequence_Start ();

			if (Value == null || Value.Count == 0) {
				Buffer.Encode__Object (null, 0, -1);
				}
			else {
				int XPosition = Buffer.Encode__Set_Start();
				foreach (byte []   _Index in Value) {
		
			Buffer.Encode__Any  (_Index, 0, 0);
					}
				Buffer.Encode__Set_End(XPosition, 0, -1);
			}
			Buffer.Debug ("Value");

			Buffer.Encode__OIDRef  (Type, 0, -1);
			Buffer.Debug ("Type");
			Buffer.Encode__Sequence_End (Position);
            }
Ejemplo n.º 2
0
		/// <summary>
		/// Encode ASN.1 class members to specified buffer. 
		///
		/// NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.
		/// </summary>
		/// <param name="Buffer">Output buffer</param>
        public override void Encode (Goedel.ASN1.Buffer Buffer) {
			int Position = Buffer.Encode__Sequence_Start ();

			if (Attributes == null || Attributes.Count == 0) {
				Buffer.Encode__Object (null, 1, 0);
				}
			else {
				int XPosition = Buffer.Encode__Set_Start();
				foreach (Goedel.Cryptography.PKIX.AttributeTypeValues  _Index in Attributes) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Set_End(XPosition, 1, 0);
			}
			Buffer.Debug ("Attributes");

			Buffer.Encode__Octets  (PrivateKey, 0, -1);
			Buffer.Debug ("PrivateKey");

			Buffer.Encode__Object (PrivateKeyAlgorithm, 0, -1);
			Buffer.Debug ("PrivateKeyAlgorithm");

			Buffer.Encode__Integer  (Version, 0, -1);
			Buffer.Debug ("Version");
			Buffer.Encode__Sequence_End (Position);
            }
Ejemplo n.º 3
0
		/// <summary>
		/// Encode ASN.1 class members to specified buffer. 
		///
		/// NB Assinine ASN.1 DER encoding rules requires members be added in reverse order.
		/// </summary>
		/// <param name="Buffer">Output buffer</param>
        public override void Encode (Goedel.ASN1.Buffer Buffer) {

			if (Member == null || Member.Count == 0) {
				Buffer.Encode__Object (null, 0, -1);
				}
			else {
				int XPosition = Buffer.Encode__Set_Start();
				foreach (Goedel.Cryptography.PKIX.AttributeTypeValue  _Index in Member) {
		
			Buffer.Encode__Object (_Index, 0, 0);
					}
				Buffer.Encode__Set_End(XPosition, 0, -1);
			}
            }