ASN1C C# Runtime Library
7.5
|
Public Member Functions | |
Asn1PerDecodeBuffer (byte[] msgdata, bool aligned) | |
Asn1PerDecodeBuffer (System.IO.Stream istream, bool aligned) | |
virtual void | BinDump (System.String varName) |
virtual void | BinDump (System.IO.StreamWriter outs, System.String varName) |
override void | ByteAlign () |
virtual bool | DecodeBit (System.String ident) |
override bool | DecodeBit () |
virtual int | DecodeBitsToInt (int nbits, System.String ident) |
override int | DecodeBitsToInt (int nbits) |
virtual long | DecodeBitsToLong (int nbits, System.String ident) |
override long | DecodeBitsToLong (int nbits) |
virtual void | DecodeBitsToOctetArray (byte[] data, int offset, int nbits, System.String ident) |
virtual void | DecodeBitsToOctetArray (byte[] data, int offset, int bitOffset, int nbits, System.String ident) |
override void | DecodeBitsToOctetArray (byte[] data, int offset, int nbits) |
virtual void | DecodeCharString (int nchars, int abpc, int ubpc, Asn1CharSet charSet, System.Text.StringBuilder sbuf) |
virtual long | DecodeConsWholeNumber (long rangeValue, System.String ident) |
virtual long | DecodeConsWholeNumber (long rangeValue) |
virtual long | DecodeExtLength () |
virtual long | DecodeInt (int nocts, bool signExtend, System.String ident) |
virtual long | DecodeInt (int nocts, bool signExtend) |
virtual long | DecodeLength () |
virtual long | DecodeLength (long lower, long upper) |
virtual int | DecodeSmallLength () |
virtual int | DecodeSmallNonNegWholeNumber () |
virtual long | DecodeUnconsLength () |
virtual bool | IsAligned () |
virtual void | SetAligned (bool data) |
void | SetSizeConstraint (long lower, long upper) |
void | SetSizeConstraintExt (long lower, long upper, long extLower, long extUpper) |
Public Member Functions inherited from Asn1DecodeBitBuffer | |
Asn1DecodeBitBuffer (byte[] msgdata) | |
Asn1DecodeBitBuffer (System.IO.Stream istream) | |
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) |
Public Member Functions inherited from Asn1PerMessageBuffer | |
System.IO.Stream | GetInputStream () |
Static Public Member Functions | |
static Asn1PerDecodeBuffer | SetBuffer (Asn1PerDecodeBuffer buffer, byte[] msgdata, bool aligned) |
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 | |
virtual Asn1PerTraceHandler | TraceHandler [get] |
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] |
Properties inherited from Asn1PerMessageBuffer | |
int | MsgBitCnt [get] |
Asn1PerTraceHandler | TraceHandler [get] |
This class handles the decoding of ASN.1 messages as specified in the Packed Encoding Rules (PER) ITU-T X.691 standard.
Asn1PerDecodeBuffer | ( | byte [] | msgdata, |
bool | aligned | ||
) |
This constructor creates a PER Decode buffer object that references an encoded ASN.1 message.
msgdata | Byte array containing an encoded ASN.1 message. |
aligned | true for specifying PER aligned; otherwise false for unaligned encoding. |
Asn1PerDecodeBuffer | ( | System.IO.Stream | istream, |
bool | aligned | ||
) |
This constructor creates a PER 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. |
aligned | Boolean specifying PER aligned or unaligned encoding. |
|
virtual |
This method invokes an overloaded version of BinDump to dump the encoded message to standard output.
varName | Name of top-level message object variable |
|
virtual |
This method dumps the encoded message in a human-readable format showing a bit trace of all fields to the given output stream.
outs | StreamWriter object to which output should be written |
varName | Name of top-level message object variable |
|
virtual |
This methods byte-aligns the buffer. If the buffer was created unaligned, this does nothing.
Reimplemented from Asn1DecodeBitBuffer.
Referenced by Asn1BitString.BaseDecode(), Asn1OctetString.CompareTo(), Asn1Integer.Decode(), Asn1BigInteger.Decode(), Asn1OctetString.Decode(), Asn1UniversalString.Decode(), Asn1Integer.DecodeValue(), Asn1Real10.Encode(), Asn1UTF8String.Encode(), Asn1BigInteger.Encode(), and Asn1CharString.validate().
|
virtual |
This method decodes a single bit value.
ident | Bit field identifier name for tracing. |
Referenced by Asn1OpenExt.Decode(), Asn1TimeUtil.DecodeDateTime(), Asn1TimeUtil.DecodeDuration(), and Asn1Boolean.Encode().
|
virtual |
This method decodes a single bit value. The ident
argument which is used for tracing is defaulted to 'value'.
Reimplemented from Asn1DecodeBitBuffer.
|
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 |
ident | Bit field identifier name for tracing. |
Referenced by Asn1UniversalString.Decode(), Asn1Real10.Encode(), and Asn1Real.Encode().
|
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. The ident
argument which is used for tracing is defaulted to 'value'.
nbits | Number of bits to Decode |
Reimplemented from Asn1DecodeBitBuffer.
|
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 |
ident | Bit field identifier name for tracing. |
Referenced by Asn1Real.Encode().
|
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. The ident
argument which is used for tracing is defaulted to 'value'.
nbits | Number of bits to Decode |
Reimplemented from Asn1DecodeBitBuffer.
|
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 |
ident | Bit field identifier name for tracing. |
Referenced by Asn1BitString.BaseDecode(), Asn1OctetString.CompareTo(), Asn1BigInteger.Decode(), Asn1OctetString.Decode(), Asn1Real10.Encode(), and Asn1UTF8String.Encode().
|
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 |
ident | Bit field identifier name for tracing. |
|
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 ident
argument which is used for tracing is defaulted to 'value'.
data | Octet array for decoded data |
offset | Starting byte offset into array |
nbits | Number of bits to Decode |
Reimplemented from Asn1DecodeBitBuffer.
|
virtual |
This method decodes the contents of a known-multiplier character string. This version of the method assumes a permitted alphabet constraint is in place.
nchars | Number of characters |
abpc | Number of bits per character (aligned) |
ubpc | Number of bits per character (unaligned) |
charSet | Object representing the permitted alphabet constraint character set (optional) |
sbuf | String buffer to receive decoded result |
References Asn1CharSet.GetCharAtIndex(), Asn1CharSet.GetNumBitsPerChar(), and Asn1CharSet.MaxValue.
Referenced by Asn1Real.Encode(), and Asn1CharString.validate().
|
virtual |
This method implements the rules to Decode a constrained whole number as specified in section 10.5 of the X.691 standard.
rangeValue | upper - lower + 1. Treated as unsigned, with 0 representing 2^64. |
ident | Tracing identifier |
References Asn1Integer.GetBitCount(), Asn1Integer.GetUnsignedBitCount(), and Diag.Prtln().
Referenced by Asn1X694OrderElement.Decode(), Asn1BigInteger.Decode(), Asn1TimeUtil.DecodeDateTime(), Asn1TimeUtil.DecodeDuration(), and Asn1Integer.DecodeValue().
|
virtual |
This method implements the rules to Decode a constrained whole number as specified in section 10.5 of the X.691 standard. The ident
argument which is used for tracing is defaulted to 'value'.
rangeValue | lower - upper + 1 |
|
virtual |
This method decodes an extension length value. Note that the decoded length is not what is returned. The bit offset to the start of the next element within the Decode buffer is returned.
|
virtual |
This method implements the rules to Decode an unconstrained integer value.
nocts | Number of octets to Decode |
signExtend | Sign extend resulting value |
ident | Tracing identifier |
Referenced by Asn1Integer.Decode(), Asn1Integer.DecodeValue(), and Asn1Real.Encode().
|
virtual |
This method implements the rules to Decode an unconstrained integer value. The ident
argument which is used for tracing is defaulted to 'value'.
nocts | Number of octets to Decode |
signExtend | Sign extend resulting value |
|
virtual |
This method decodes either a constrained or unconstrained length depending on whether a size constraint object is set in this object.
References Asn1SizeConstraint.Extensible, Asn1SizeConstraint.RootLower, and Asn1SizeConstraint.RootUpper.
Referenced by Asn1BitString.BaseDecode(), Asn1OctetString.CompareTo(), Asn1Integer.Decode(), Asn1BigInteger.Decode(), Asn1OctetString.Decode(), Asn1UniversalString.Decode(), Asn1Integer.DecodeValue(), Asn1RelativeOID.Encode(), Asn1Real10.Encode(), Asn1ObjectIdentifier.Encode(), Asn1UTF8String.Encode(), Asn1BigInteger.Encode(), Asn1Real.Encode(), and Asn1CharString.validate().
|
virtual |
This method decodes a constrained length determinant value.
lower | Lower bound (inclusive) of length value range |
upper | Upper bound (inclusive) of length value range |
|
virtual |
This method implements the rules to Decode a normally small length as specified in section 11.9 of the X.691 standard.
References Diag.Prtln().
Referenced by Asn1OpenExt.Decode().
|
virtual |
This method implements the rules to Decode a small non-negative whole number as specified in section 10.6 of the X.691 standard.
References Diag.Prtln().
Referenced by Asn1ChoiceExt.Decode().
|
virtual |
This method decodes a general (unconstrained) length determinant value as described in section 11.9 of the 2008 X.691 standard. The maximum value that will be returned is 64K which is the largest length fragment size defined for PER. If a value of 16K or larger is returned, the user must repeat this call to fully Decode the fragmented contents.
References Diag.Prtln().
|
virtual |
This method tests if PER alignment is turned on or off.
true
for PER aligned encoding or false
for unaligned encoding. Implements Asn1PerMessageBuffer.
Referenced by Asn1BigInteger.Decode(), Asn1UniversalString.Decode(), and Asn1CharString.validate().
|
virtual |
This method is used to turn PER aligned encoding on or off.
data | true for PER aligned encoding or false for unaligned encoding. |
|
static |
This method will create or reinitialize a PER Decode message buffer object to read data from the given byte array. If the existing buffer reference is null, a new buffer will be created; otherwise, the existing buffer will be reused.
buffer | Existing message buffer object |
msgdata | Byte array containing message data |
aligned | true specifying PER aligned or false for unaligned encoding. |
References Asn1DecodeBitBuffer.SetInputStream().
void SetSizeConstraint | ( | long | lower, |
long | upper | ||
) |
This method is used to set a size constraint within the buffer object. The constraint will only be set if an existing constraint is not already in place (i.e. if the existing reference is not null). This is used for length decoding of SEQUENCE OF objects to pass constraints applied to referenced objects to the base object.
void SetSizeConstraintExt | ( | long | lower, |
long | upper, | ||
long | extLower, | ||
long | extUpper | ||
) |
This method is used to set an extensible size constraint in the buffer object. The constraint will only be set if an existing constraint is not already in place (i.e. if the existing reference is not null). This is used for length encoding of SEQUENCE OF objects to pass constraints applied to referenced objects to the base object.
|
get |
Gets a reference to the internal trace handler object used to trace the bit fields within a PER message.
Value:
Asn1PerTraceHandler object
Referenced by Asn1RelativeOID.Encode(), Asn1ObjectIdentifier.Encode(), and Asn1BigInteger.Encode().