/// <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 (); Buffer.Encode__Integer (PathLenConstraint, 4, -1); // Default is false if (CA != false) { Buffer.Encode__Boolean (CA, 0, -1); } Buffer.Encode__Sequence_End (Position); }
/// <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 (); Buffer.Encode__Octets (Data, 0, -1); Buffer.Debug ("Data"); // Default is false if (Critical != false) { Buffer.Encode__Boolean (Critical, 4, -1); } Buffer.Debug ("Critical"); Buffer.Encode__OIDRef (ObjectIdentifier, 0, -1); Buffer.Debug ("ObjectIdentifier"); Buffer.Encode__Sequence_End (Position); }