ASN1C C# Runtime Library  7.4
Public Member Functions | List of all members
Asn1DerEncodeBuffer Class Reference
Inheritance diagram for Asn1DerEncodeBuffer:
Asn1BerEncodeBuffer

Public Member Functions

 Asn1DerEncodeBuffer ()
 
 Asn1DerEncodeBuffer (int sizeIncrement)
 
override int TrimBitString (Asn1BitString bitstr)
 
- Public Member Functions inherited from Asn1BerEncodeBuffer
 Asn1BerEncodeBuffer ()
 
 Asn1BerEncodeBuffer (int sizeIncrement)
 
override void BinDump (System.IO.StreamWriter outs, System.String varName)
 
virtual void BinDump ()
 
virtual int EncodeIdentifier (int ident)
 
virtual int EncodeIntValue (long ivalue)
 
virtual int EncodeLength (int len)
 
virtual int EncodeTag (Asn1Tag tag)
 
virtual int EncodeTagAndLength (Asn1Tag tag, int len)
 
virtual int EncodeTagAndLength (short tagClass, short tagForm, int tagIDCode, int len)
 
virtual int EncodeUnsignedBinaryNumber (long ivalue)
 

Detailed Description

This class handles the encoding of ASN.1 messages as specified in the Distinguished Encoding Rules (DER) as specified in the ITU-T X.690 standard.

Constructor & Destructor Documentation

◆ Asn1DerEncodeBuffer() [1/2]

This constructor creates a DER encode buffer object with the default size increment. Whenever the buffer becomes full, the buffer will be expanded by the sizeIncrement size.

◆ Asn1DerEncodeBuffer() [2/2]

Asn1DerEncodeBuffer ( int  sizeIncrement)

This constructor creates a DER encode buffer object with the given size increment. Whenever the buffer becomes full, the buffer will be expanded by the sizeIncrement size. This size should be large enough to prevent resizing in normal operation.

Parameters
sizeIncrementThe initial size in bytes of an encode buffer. If the buffer becomes full, it will be expanded by this amount.

Member Function Documentation

◆ TrimBitString()

override int TrimBitString ( Asn1BitString  bitstr)
virtual

This method will trim a BIT STRING for DER encoding by removing all zero trailing bits.

<param name="bitstr> ASN.1 BIT STRING object <return> Adjusted bit count </return>

Reimplemented from Asn1BerEncodeBuffer.

References Asn1BitString.Get(), and Asn1BitString.numbits.