ASN1C C# Runtime Library
7.2
|
Public Member Functions | |
Asn1DecodeBitBuffer (byte[] msgdata) | |
Asn1DecodeBitBuffer (System.IO.Stream istream) | |
virtual void | ByteAlign () |
virtual bool | DecodeBit () |
virtual int | DecodeBitsToInt (int nbits) |
virtual long | DecodeBitsToLong (int nbits) |
virtual void | DecodeBitsToOctetArray (byte[] data, int offset, int nbits) |
virtual void | DecodeBitsToOctetArray (byte[] data, int offset, int bitOffset, int nbits) |
void | MoveBitCursor (long offset) |
sealed override int | ReadByte () |
sealed override void | SetInputStream (byte[] msgdata, int offset, int length) |
Public Member Functions inherited from Asn1DecodeBuffer | |
virtual void | AddCaptureBuffer (System.IO.MemoryStream buffer) |
virtual void | Capture (int nbytes) |
virtual long | DecodeIntValue (int length, bool signExtend) |
virtual int [] | DecodeOIDContents (int llen) |
virtual int [] | DecodeRelOIDContents (int llen) |
override System.IO.Stream | GetInputStream () |
virtual void | HexDump () |
virtual void | Mark () |
virtual int | Read () |
virtual void | Read (byte[] buffer, int offset, int nbytes) |
virtual void | Read (byte[] buffer) |
int | Read2Bytes () |
int | Read4Bytes () |
virtual void | RemoveCaptureBuffer (System.IO.MemoryStream buffer) |
virtual void | Reset () |
virtual long | Skip (long nbytes) |
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 long | BitOffset [get] |
virtual int | MsgBitCnt [get] |
Properties inherited from Asn1DecodeBuffer | |
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 class handles decoding where the decode buffer is viewed as a set of bits (i.e. a bit offset is maintained).
Asn1DecodeBitBuffer | ( | byte [] | msgdata | ) |
This constructor creates a Decode buffer object that references an encoded ASN.1 message.
msgdata | Byte array containing an encoded ASN.1 message. |
Asn1DecodeBitBuffer | ( | System.IO.Stream | istream | ) |
This constructor creates a Decode buffer object that references an encoded ASN.1 message. In this case, the message is passed in using an System.IO.Stream object.
istream | Input stream containing an encoded ASN.1 message. |
|
virtual |
This methods byte-aligns the buffer.
Reimplemented in Asn1PerDecodeBuffer.
|
virtual |
This method decodes a single bit value.
Reimplemented in Asn1PerDecodeBuffer.
Referenced by Asn1TimeUtil.DecodeDuration().
|
virtual |
This method decodes bits from the input stream into a standard integer value. Up to 32 bits can be decoded. The bits are placed in the least-significant bytes of the integer.
nbits | Number of bits to Decode |
Reimplemented in Asn1PerDecodeBuffer.
Referenced by Asn1Boolean.Decode(), and Asn1BigInteger.DecodeUnsigned().
|
virtual |
This method decodes bits from the input stream into a long integer value. Up to 64 bits can be decoded. The bits are placed in the least-significant bytes of the long integer.
nbits | Number of bits to Decode |
Reimplemented in Asn1PerDecodeBuffer.
References Diag.Prtln(), Asn1Util.ToHexString(), and Asn1Util.URShift().
|
virtual |
This method decodes bits from the input stream into an array of octets. The user is expected to have provided an array large enough to hold the number of bits requested to be decoded.
data | Octet array for decoded data |
offset | Starting byte offset into array |
nbits | Number of bits to Decode |
Reimplemented in Asn1PerDecodeBuffer.
Referenced by Asn1Real.DecodeDouble(), Asn1BigInteger.DecodeSigned(), Asn1Real.DecodeSingle(), and Asn1BigInteger.DecodeUnsigned().
|
virtual |
This method decodes bits from the input stream into an array of octets. The user is expected to have provided an array large enough to hold the number of bits requested to be decoded.
The first bit is decoded into the given offset byte at the MSB if bitOffset == 0, and at the LSB if bitOffset == 7.
data | Octet array for decoded data |
offset | Starting byte offset into array |
bitOffset | Where in first byte the first bit goes |
nbits | Number of bits to Decode |
References Diag.Prtln(), and Asn1Util.ToHexString().
void MoveBitCursor | ( | long | offset | ) |
This method moves the bit cursor to the given offset.
offset | Absolute bit offset value |
|
virtual |
This 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.
Implements Asn1DecodeBuffer.
Referenced by Asn1Real10.Decode(), and Asn1CharString.DecodeByteToChar().
|
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 from Asn1DecodeBuffer.
Referenced by Asn1PerDecodeBuffer.SetBuffer().
|
get |
Gets the absolute offset to the current bit in the Decode buffer.
Value:
offset to current bit in Decode buffer
|
get |
Gets the number of bits in the encoded message.
Value:
count of bits in encoded message