ASN1C C# Runtime Library
7.8
|
Classes | |
struct | BufferPos |
Public Member Functions | |
virtual void | AddCaptureBuffer (System.IO.MemoryStream buffer) |
virtual void | Capture (int nbytes) |
virtual long | DecodeIntValue (int length, bool signExtend) |
int [] | DecodeOIDContents (int llen) |
BigInteger [] | DecodeOIDContentsBig (int llen) |
int [] | DecodeRelOIDContents (int llen) |
BigInteger [] | DecodeRelOIDContentsBig (int llen) |
override System.IO.Stream | GetInputStream () |
virtual void | HexDump () |
virtual void | Mark () |
virtual void | MarkPos (ref BufferPos bufferPos) |
virtual int | Read () |
virtual void | Read (byte[] buffer, int offset, int nbytes) |
virtual void | Read (byte[] buffer) |
int | Read2Bytes () |
int | Read4Bytes () |
abstract int | ReadByte () |
virtual void | RemoveCaptureBuffer (System.IO.MemoryStream buffer) |
virtual void | Reset () |
virtual void | ResetPos (ref BufferPos bufferPos) |
virtual void | SetInputStream (byte[] msgdata, int offset, int length) |
virtual long | Skip (long nbytes) |
void | SkipOIDContents (int llen) |
int [] | SkipRelOIDContents (int llen) |
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) |
Properties | |
virtual int | ByteCount [get] |
bool | LazyOpenTypeDecode [get, set] |
Properties inherited from Asn1MessageBuffer | |
virtual Asn1MessageBuffer | EventHandlerList [set] |
Properties inherited from Asn1MessageBufferBase | |
Asn1Context | Context [get] |
virtual short | TypeCode [set] |
Additional Inherited Members | |
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) |
This is the base class to specific Decode buffer classes for the different types of encoding rules (BER, DER and PER).
|
virtual |
This method is used to add a capture buffer to the internal capture buffer list. A capture buffer is used to capture all bytes read from this position forward from the input stream.
buffer | Buffer into which captured bytes are to be stored |
Referenced by Asn1PerDecodeTraceHandler.Enable().
|
virtual |
This method captures bytes from the input stream to a separate object for later analysis.
nbytes | Number of bytes to capture |
|
virtual |
This method decodes the contents of an ASN.1 integer value. It can be used for either BER or PER decoding.
length | Length of encoded contents |
signExtend | Sign-extend the decoded value to form a 2's comp result |
int [] DecodeOIDContents | ( | int | llen | ) |
This method decodes the contents of an ASN.1 object identifier value. It can be used for either BER or PER decoding.
llen | Length of encoded contents |
Referenced by Asn1ObjectIdentifier.Append(), and Asn1ObjectIdentifier.Encode().
BigInteger [] DecodeOIDContentsBig | ( | int | llen | ) |
This method decodes the contents of an ASN.1 object identifier value. It can be used for either BER or PER decoding.
llen | Length of encoded contents |
Referenced by Asn1StringOID.Asn1StringOID(), and Asn1StringOID.Encode().
int [] DecodeRelOIDContents | ( | int | llen | ) |
This method decodes the contents of an ASN.1 relative object identifier value. It can be used for either BER or PER decoding.
llen | Length of encoded contents |
References Asn1ObjectIdentifier.MAXSUBIDS.
Referenced by Asn1RelativeOID.Asn1RelativeOID(), and Asn1RelativeOID.Encode().
BigInteger [] DecodeRelOIDContentsBig | ( | int | llen | ) |
This method decodes the contents of an ASN.1 RELATIVE-OID value. It can be used for either BER or PER decoding.
llen | Length of encoded contents |
References BigInteger.DivideByInt(), Asn1ObjectIdentifier.MAXSUBIDS, and BigInteger.Subtract().
Referenced by Asn1StringRelativeOID.Asn1StringRelativeOID(), and Asn1StringRelativeOID.Encode().
|
virtual |
This method returns a reference to the current current Decode input stream object.
Implements Asn1MessageBuffer.
|
virtual |
This method provides a hex dump of the bytes in the message being decoded.
|
virtual |
This method is used to mark the current position in the input stream for retry processing.
Reimplemented in Asn1PerInputStream, Asn1BerInputStream, and Asn1DerInputStream.
|
virtual |
This method marks the current position and stores it in a user-supplied structure.
bufferPos | A BufferPos structure to hold the position information. |
|
virtual |
The read method reads a single byte from the current input stream and returns it to the caller. It will also write the byte out to all registered capture buffers.
Throws, Exception thrown by C# System.IO.Stream for I/O error for Stream as input data
Asn1EndOfBufferException | Thrown if at end-of-stream |
References Diag.Prtln(), and Asn1Util.ToHexString().
Referenced by Asn1BMPString.Asn1BMPString(), Asn1Boolean.Asn1Boolean(), Asn1Real10.Asn1Real10(), Asn1UniversalString.Asn1UniversalString(), Asn1BitString.Clear(), Asn1OctetString.CompareTo(), Asn1Real.Decode(), Asn1BMPString.Decode(), Asn1UTF8String.Decode(), Asn1OctetString.Decode(), Asn1BitString.Decode(), Asn1OctetString.Encode(), Asn1BitString.Encode(), Asn1Integer.EncodeUnsigned(), and Asn1CharString.validate().
|
virtual |
This version of the read method reads the given number of bytes from the current input stream and writes them to the specified byte array at the given offset. It also writes the data to all registered capture buffers.
Throws, Exception thrown by C# System.IO.Stream for I/O error for Stream as input data
buffer | the buffer into which the data is read |
offset | the start offset of the data |
nbytes | number of bytes to read |
Asn1EndOfBufferException | Thrown if at end-of-stream |
References Diag.Prtln().
|
virtual |
This version of the read method reads the number of bytes equal to the length of the given input buffer.
Throws, Exception thrown by C# System.IO.Stream for I/O error, for Stream as input data
buffer | the buffer into which the data is read |
Asn1EndOfBufferException | Thrown if at end-of-stream |
int Read2Bytes | ( | ) |
Read the next two bytes from the current input stream into an int, and return that int. The bytes of the int, from lowest to highest, will correspond to the bytes read from the stream, from last to first. The highest two bytes will be 0.
Each byte read will be written to all registered capture buffers.
Asn1EndOfBufferException | if at end-of-stream |
Referenced by Asn1OctetString.Decode(), and Asn1Integer.Decode16Bit().
int Read4Bytes | ( | ) |
Read the next four bytes from the current input stream into an int, and return that int. The bytes of the int, from lowest to highest, will correspond to the bytes read from the stream, from last to first.
Each byte read will be written to all registered capture buffers.
Asn1EndOfBufferException | if at end-of-stream |
Referenced by Asn1Integer.Decode32Bit().
|
pure virtual |
This abstract method returns the next available 8-bit value from the input stream. It is implemented differently for BER/DER and PER to take into account odd alignments in PER.
Implemented in Asn1BerDecodeBuffer, Asn1DecodeBitBuffer, and Asn1MderDecodeBuffer.
Referenced by Asn1Real.Decode(), and Asn1BigInteger.DecodeValue().
|
virtual |
This method is used to remove a capture buffer from the internal capture buffer list. The add and remove methods can be used to get a set of raw bytes from the input stream for further processing.
buffer | Buffer in which captured bytes stored |
|
virtual |
This method is used to reset the current position in the decode buffer back to the location of the last 'mark' call.
Reimplemented in Asn1PerInputStream, Asn1BerInputStream, and Asn1DerInputStream.
Referenced by Asn1BerDecodeContext.Expired(), and Asn1BerDecodeContext.MatchElemTag().
|
virtual |
|
virtual |
This method will set the input stream from which data is read. This version of the method allows a byte array containing encoded data to be specified.
msgdata | Byte array containing encoded message data |
offset | Starting offset of data in the byte array |
length | Length (in bytes) of the encoded data |
Reimplemented in Asn1DecodeBitBuffer.
|
virtual |
This method will skip over the requested number of bytes in the input stream.
nbytes | Number of bytes to skip |
Reimplemented in Asn1PerInputStream, Asn1BerInputStream, and Asn1DerInputStream.
Referenced by Asn1BerDecodeBuffer.CalcIndefLen().
void SkipOIDContents | ( | int | llen | ) |
This method skips the contents of an ASN.1 object identifier value. It can be used for either BER or PER decoding.
llen | Length of encoded contents |
Referenced by Asn1ObjectIdentifier.Skip(), and Asn1StringOID.Skip().
int [] SkipRelOIDContents | ( | int | llen | ) |
This method decodes the contents of an ASN.1 relative object identifier value. It can be used for either BER or PER decoding.
llen | Length of encoded contents |
Referenced by Asn1RelativeOID.Skip(), and Asn1StringRelativeOID.Skip().
|
get |
Gets the count of bytes currently read from the message being decoded or input stream.
Referenced by Asn1BerDecodeContext.Asn1BerDecodeContext(), Asn1BerDecodeBuffer.CalcIndefLen(), Asn1BerDecodeContext.Expired(), and Asn1BerDecodeContext.MatchElemTag().
|
getset |
Lazy open type decoding. This property is relevant only when generating table constraint code (otherwise, open types cannot be decoded). Generated decode methods check this property to determine whether to decode open types or not. When lazy open type decoding is turned on, you can use the generated decodeOpenType* methods to decode open types (again, assuming table constraint code was generated).