/// <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); }
/// <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 (Extensions == null || Extensions.Count == 0) { Buffer.Encode__Object (null, 0, -1); } else { int XPosition = Buffer.Encode__Sequence_Start(); foreach (Goedel.Cryptography.PKIX.Extension _Index in Extensions) { Buffer.Encode__Object (_Index, 0, 0); } Buffer.Encode__Sequence_End(XPosition, 0, -1); } Buffer.Debug ("Extensions"); if (SubjectAltName == null || SubjectAltName.Count == 0) { Buffer.Encode__Object (null, 0, -1); } else { int XPosition = Buffer.Encode__Sequence_Start(); foreach (Goedel.Cryptography.PKIX.SubjectAltName _Index in SubjectAltName) { Buffer.Encode__Object (_Index, 0, 0); } Buffer.Encode__Sequence_End(XPosition, 0, -1); } Buffer.Debug ("SubjectAltName"); if (Subject == null || Subject.Count == 0) { Buffer.Encode__Object (null, 0, -1); } else { int XPosition = Buffer.Encode__Sequence_Start(); foreach (Goedel.Cryptography.PKIX.Name _Index in Subject) { Buffer.Encode__Object (_Index, 0, 0); } Buffer.Encode__Sequence_End(XPosition, 0, -1); } Buffer.Debug ("Subject"); Buffer.Encode__Octets (SubjectKeyIdentifier, 0, -1); Buffer.Debug ("SubjectKeyIdentifier"); Buffer.Encode__Octets (IssuerKeyIdentifier, 0, -1); Buffer.Debug ("IssuerKeyIdentifier"); Buffer.Encode__Time (Issued, 0, -1); Buffer.Debug ("Issued"); Buffer.Encode__Integer (Version, 0, -1); Buffer.Debug ("Version"); 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 (EncryptedContent, 5, 0); Buffer.Debug ("EncryptedContent"); Buffer.Encode__Object (Algorithm, 0, -1); Buffer.Debug ("Algorithm"); Buffer.Encode__OIDRef (ContentType, 0, -1); Buffer.Debug ("ContentType"); 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 (EncryptedData, 0, -1); Buffer.Debug ("EncryptedData"); Buffer.Encode__Object (EncryptionAlgorithm, 0, -1); Buffer.Debug ("EncryptionAlgorithm"); 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 (); // Default is 1 if (Iterations != 1) { Buffer.Encode__Integer (Iterations, 0, -1); } Buffer.Debug ("Iterations"); Buffer.Encode__Octets (MacSalt, 0, -1); Buffer.Debug ("MacSalt"); Buffer.Encode__Object (MAC, 0, -1); Buffer.Debug ("MAC"); 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) { Buffer.Encode__Octets (Value, 0, -1); }
/// <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 (AuthorityCertSerialNumber, 12, 2); if (AuthorityCertIssuer == null || AuthorityCertIssuer.Count == 0) { Buffer.Encode__Object (null, 12, 1); } else { int XPosition = Buffer.Encode__Sequence_Start(); foreach (Goedel.Cryptography.PKIX.GeneralName _Index in AuthorityCertIssuer) { Buffer.Encode__Object (_Index, 0, 0); } Buffer.Encode__Sequence_End(XPosition, 12, 1); } Buffer.Encode__Octets (KeyIdentifier, 12, 0); 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); }
/// <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 (SubjectPublicKey, 0, -1); Buffer.Debug ("SubjectPublicKey"); Buffer.Encode__Object (Algorithm, 0, -1); Buffer.Debug ("Algorithm"); Buffer.Encode__Sequence_End (Position); }