ASN1C C# Runtime Library
7.7
|
Public Member Functions | |
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) |
virtual int | TrimBitString (Asn1BitString bitstr) |
This class handles the encoding of ASN.1 messages as specified in the Basic Encoding Rules (BER) as specified in the ITU-T X.690 standard. A reference to an object of this type is passed to each of the ASN.1 type encode methods involved in encoding a particular message type.
This constructor creates a BER encode buffer object with the default size increment. Whenever the buffer becomes full, the buffer will be expanded by the sizeIncrement size.
Asn1BerEncodeBuffer | ( | int | sizeIncrement | ) |
This constructor creates a BER 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.
sizeIncrement | The initial size in bytes of an encode buffer. If the buffer becomes full, it will be expanded by the amount. |
|
virtual |
This method dumps the encoded message in a human-readable format showing tags and contents to the given output stream.
outs | StreamWriter where dump will be printed |
varName | Name of the Decoded ASN1 Type |
Implements Asn1EncodeBuffer.
|
virtual |
This method invokes an overloaded version of BinDump to dump the encoded message to standard output.
|
virtual |
This method encodes an ASN.1 identifier value such as the ones used in a tags or object identifiers.
ident | The identifier to be encoded. |
Referenced by Asn1RelativeOID.Encode(), and Asn1ObjectIdentifier.Encode().
|
virtual |
This method encodes an ASN.1 integer value's contents according to the ASN.1 Basic Encoding Rules (BER)..
ivalue | Integer value to encode |
References Diag.Prtln().
Referenced by Asn1Integer.Asn1Integer(), Asn1Enumerated.Encode(), and Asn1X694OrderElement.Encode().
|
virtual |
This method encodes a length value.
len | The length to be encoded. |
References Asn1Status.INDEFLEN.
|
virtual |
This method encodes a tag value.
tag | The tag to be encoded. |
References Asn1Tag.EXTIDCODE, Asn1Tag.mClass, Asn1Tag.mForm, and Asn1Tag.mIDCode.
|
virtual |
This method encodes both a tag and length value.
tag | The tag to be encoded. |
len | The length to be encoded. |
Referenced by Asn1Integer.Asn1Integer(), Asn1Real10.Asn1Real10(), Asn1BitString.Clear(), Asn1OctetString.CompareTo(), Asn1Enumerated.Encode(), Asn1RelativeOID.Encode(), Asn1X694OrderElement.Encode(), Asn1UTF8String.Encode(), Asn1Real10.Encode(), Asn1Boolean.Encode(), Asn1ObjectIdentifier.Encode(), Asn1BMPString.Encode(), Asn1BigInteger.Encode(), Asn1UniversalString.Encode(), Asn1Real.Encode(), Asn1Null.Equals(), and Asn1CharString.validate().
|
virtual |
This overloaded version of encodeTagAndLength allows tag value components to be specified instead of an Asn1Tag object
tagClass | The class of the tag to be encoded. |
tagForm | The form of the tag to be encoded. |
tagIDCode | The ID code of the tag to be encoded. |
len | The length to be encoded. |
References Asn1BerDecodeBuffer.Parse().
|
virtual |
This method encodes an integer value as unsigned binary number according to the ASN.1 Basic Encoding Rules (BER)..
ivalue | Integer value to encode |
References Diag.Prtln().
|
virtual |
This method will trim a BIT STRING for DER encoding by removing all zero trailing bits. The default implementation in Asn1BerEncodeBuffer does nothing. The overriden version in Asn1DerEncodeBuffer will trim the string.
<param name="bitstr> ASN.1 BIT STRING object <return> Adjusted bit count </return>
Reimplemented in Asn1DerEncodeBuffer.
References Asn1BitString.numbits.