ASN1C C# Runtime Library
7.8
|
Public Member Functions | |
Asn1OerDecodeBuffer (byte[] msgdata) | |
Asn1OerDecodeBuffer (System.IO.Stream istream) | |
long | DecodeIntSigned (int octets) |
long | DecodeIntSigned () |
long | DecodeIntUnsigned (int octets) |
long | DecodeIntUnsigned () |
int | DecodeQuantity () |
void | DecodeTag (Asn1Tag tag) |
long | DecodeVarUnsigned (int octets) |
bool | GetCanonicalMode () |
void | SetCanonicalMode (bool value) |
Public Member Functions inherited from Asn1DecodeBitBuffer | |
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) |
void | SkipBits (long bits) |
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) |
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 () |
virtual void | RemoveCaptureBuffer (System.IO.MemoryStream buffer) |
virtual void | Reset () |
virtual void | ResetPos (ref BufferPos bufferPos) |
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) |
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) |
Properties inherited from Asn1DecodeBitBuffer | |
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] |
Asn1OerDecodeBuffer | ( | byte [] | msgdata | ) |
This constructor creates a BER decode buffer object that references an encoded ASN.1 message.
msgdata | Byte array containing an encoded ASN.1 message. |
Asn1OerDecodeBuffer | ( | System.IO.Stream | istream | ) |
This constructor creates a BER decode buffer object that references an encoded ASN.1 message.
In this case, the message is passed in using an InputStream object.
istream | Input stream containing an encoded ASN.1 message. |
long DecodeIntSigned | ( | int | octets | ) |
Decode a signed integer value (2's complement form), of the given length.
Note: this function will do sign-extension so that if a negative value was encoded in less than 8 bytes, the returned long will be that value (and not some positive value).
octets; | 0 < octets <= 8 |
Referenced by Asn1TimeUtil.ConvertToDER(), Asn1Integer.Decode(), Asn1UniversalString.Decode(), Asn1Integer.DecodeSigned(), Asn1BigInteger.DecodeSigned(), and Asn1Integer.Encode().
long DecodeIntSigned | ( | ) |
Decode an integer value as a variable length, signed integer, including decoding the length, according to OER.
This is used for integer values that have a lower bound less than -2^63, no lower bound, or a lower bound less than zero in combination with an upper bound greater than 2^63-1, or no upper bound. (In other words, it doesn't fit in a signed 64-bit integer.)
long DecodeIntUnsigned | ( | int | octets | ) |
Decode an unsigned integer value (a binary integer, not 2's complement form), of the given length. /p>
octets | The number of octets; 0 < octets <= 8 |
Referenced by Asn1TimeUtil.ConvertToDER(), Asn1BitString.Decode(), Asn1Integer.DecodeUnsigned(), and Asn1BigInteger.DecodeUnsigned().
long DecodeIntUnsigned | ( | ) |
Decode an integer value as a variable length, unsigned integer, including decoding the length, according to OER. This is used for integer values that are constrained to be non-negative but which have no upper bound or an upper bound greater than 2^64 - 1.
int DecodeQuantity | ( | ) |
Decode an OER quantity (used for SEQUENCE-OF and SET-OF)
IOException |
void DecodeTag | ( | Asn1Tag | tag | ) |
Decode a tag encoded in OER.
tag | Object to decode into. |
References Asn1Tag.mClass, and Asn1Tag.mIDCode.
long DecodeVarUnsigned | ( | int | octets | ) |
Decode an unsigned integer value (a binary integer, not 2's complement form), of the given length.
This will throw an exception if canonical mode is set and the encoding used extra bytes.
Note: if octets >= 8, this method will throw an exception if the encoded integer is outside the range of a long; the exception is not necessarily thrown as the integer might not have been encoded in the minimal number of octets.
octets | The number of octets; 0 < octets |
bool GetCanonicalMode | ( | ) |
Return true if canonical mode has been indicated by calling SetCanonicalMode(true);
Referenced by Asn1BitString.Decode(), and Asn1Boolean.Encode().
void SetCanonicalMode | ( | bool | value | ) |
Turn canonical mode on/off. Turning canonical mode on acts as a signal to both generated code and runtime code that the user wants to enforce the canonical OER rules. It is not required to turn on canonical mode just because the encoding is canonical.