ASN1C C# Runtime Library
7.5
|
Public Member Functions | |
virtual void | BinDump (System.String varName) |
abstract void | BinDump (System.IO.StreamWriter outs, System.String varName) |
abstract void | Copy (byte value) |
void | Copy (byte[] value) |
abstract void | Copy (byte[] value, int offset, int len) |
override Stream | GetInputStream () |
Stream | GetOutputStream () |
virtual void | HexDump () |
virtual void | HexDump (System.IO.StreamWriter outs) |
abstract void | Reset () |
abstract void | Write (System.IO.Stream outs) |
Public Member Functions inherited from Asn1MessageBuffer | |
virtual void | AddNamedEventHandler (Asn1NamedEventHandler handler) |
virtual void | InvokeCharacters (System.String svalue) |
virtual void | InvokeEndElement (System.String name, int index) |
virtual void | InvokeStartElement (System.String name, int index) |
Public Member Functions inherited from Asn1MessageBufferBase | |
void | SetKey (byte[] rtkey) |
void | SetPermanentKey (byte[] rtkey) |
Static Public Member Functions | |
static int | EncodeIntSigned (long value, byte[] dest, int offset) |
static int | EncodeIntUnsigned (long value, byte[] dest, int offset) |
static int | GetMinimalOctetsSigned (long value) |
static int | GetMinimalOctetsUnsigned (long value) |
Static Public Member Functions inherited from Asn1MessageBufferBase | |
static void | HexDump (System.IO.Stream ins, System.IO.StreamWriter outs) |
static void | HexDump (System.IO.Stream ins) |
Public Attributes | |
const int | SIZE_INCREMENT = 1024 |
Properties | |
abstract System.IO.MemoryStream | ByteArrayInputStream [get] |
abstract byte [] | MsgCopy [get] |
abstract int | MsgLength [get] |
Properties inherited from Asn1MessageBuffer | |
virtual Asn1MessageBuffer | EventHandlerList [set] |
Properties inherited from Asn1MessageBufferBase | |
Asn1Context | Context [get] |
virtual short | TypeCode [set] |
This is the base class to specific encode buffer classes for the different types of encoding rules (BER, DER and PER).
|
virtual |
This method invokes an overloaded version of BinDump to dump the encoded message to standard output.
varName | Name of the Decoded ASN1 Type |
|
pure virtual |
This method dumps the encoded message in a human-readable format showing a bit trace of all fields to the given print output stream.
outs | Output will be written to this stream |
varName | Name of the Decoded ASN1 Type |
Implemented in Asn1BerEncodeBuffer, Asn1XmlEncodeBuffer, Asn1XerEncodeBuffer, Asn1PerEncodeBuffer, and Asn1OerEncodeBuffer.
|
pure virtual |
This abstract method is used to copy a single byte to the encode buffer.
value | The byte value to copy |
Referenced by Asn1BigInteger.DecodeValue(), and Asn1EncodeBuffer.HexDump().
void Copy | ( | byte [] | value | ) |
This method copies multiple bytes to the encode buffer
value | Array of bytes to copy to the encode buffer |
Referenced by Asn1Real10.Asn1Real10(), Asn1BitString.Clear(), Asn1OctetString.CompareTo(), Asn1UTF8String.Encode(), Asn1Real10.Encode(), Asn1Boolean.Encode(), Asn1BMPString.Encode(), Asn1UniversalString.Encode(), Asn1Integer.Encode(), Asn1Real.Encode(), Asn1OpenType.Encode(), Asn1OctetString.EncodeContent(), Asn1BitString.EncodeContent(), Asn1Real.EncodeDouble(), Asn1Real.EncodeSingle(), Asn1OerEncodeBuffer.EndSetOf(), and Asn1CharString.validate().
|
pure virtual |
This method copies multiple bytes from the given array to the encode buffer.
value | Array of bytes to copy to the encode buffer |
offset | The first byte copied is value[offset] |
len | The last byte copied is value[offset + len - 1] |
|
static |
Encode an integer value as a signed value (2's complement), in the minimum number of octets possible (>=1), into the given array. /p>
value | The value to encode. |
dest | The array to but the encoding into. It must be large enough to hold the result, taking into account the given offset. |
offset | The index where the first byte should go. |
Referenced by Asn1Real.Encode().
|
static |
Encode an integer value as an unsigned value (binary integer), in the minimum number of octets possible (>=1), into the given array.
value | The value to encode. It must be non-negative. |
dest | The array to but the encoding into. It must be large enough to hold the result, taking into account the given offset. |
offset | The index where the first byte should go. |
Referenced by Asn1Real.Encode().
|
virtual |
This method returns an input stream representing the encoded message.
Implements Asn1MessageBuffer.
|
static |
Return the minimal number of octets required to represent the given value, when a signed representation is being used.
Referenced by Asn1Enumerated.Encode(), and Asn1Real.Encode().
|
static |
Return the minimal number of octets required to represent the given value, when an unsigned representation is being used.
value | Must be >=0 |
Referenced by Asn1Real.Encode().
Stream GetOutputStream | ( | ) |
Return an output stream associated with this object. Anything written to the Stream will be written to this buffer using copy(byte) or copy(byte[]).
Referenced by Asn1Type.EncodeAsOpenType().
|
virtual |
This method dumps the encoded message in hex/ascii format to the standard output stream.
Reimplemented in Asn1PerEncodeBuffer.
|
virtual |
This method dumps the encoded message in hex/ascii format to the given print output stream.
outs | Output stream object reference |
References Asn1EncodeBuffer.Copy(), and Asn1EncodeBuffer.MsgLength.
|
pure virtual |
This method resets the buffer to allow a new record to be encoded into it. Any previously encoded data is lost.
Implemented in Asn1PerEncodeBuffer.
|
pure virtual |
This method writes the encoded record to the given output stream.
outs | Output stream to which record is to be written |
const int SIZE_INCREMENT = 1024 |
This constant specifies the default size of the encode buffer and size it will be incremented by each time the buffer expands. It is currently set to 1024 bytes.
|
get |
Gets a reference to a MemoryStream representing the encoded message. This is the preferred way to access the contents of the encoded message as it is the most efficient (it does not make a copy of the message).
Value:
MemoryStream containing encoded message
|
get |
Gets the encoded message in a byte array. This is less efficient than the GetInputStream method because the message contents must be copied to a newly created byte array.
Value:
byte array containing encoded message
Referenced by Asn1OpenType.Asn1OpenType().
|
get |
Gets the length (in bytes) of the encoded message component.
Value:
length of encoded message component
Referenced by Asn1OpenType.Asn1OpenType(), and Asn1EncodeBuffer.HexDump().