ASN1C C# Runtime Library
7.8
|
Public Member Functions | |
Asn1BigInteger () | |
Asn1BigInteger (BigInteger value) | |
Asn1BigInteger (System.String value) | |
Asn1BigInteger (System.String value, int radix) | |
override void | Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) |
override void | Decode (Asn1PerDecodeBuffer buffer) |
void | Decode (Asn1PerDecodeBuffer buffer, BigInteger lower, BigInteger upper) |
override void | Decode (Asn1OerDecodeBuffer buffer) |
void | DecodeSigned (Asn1OerDecodeBuffer buffer) |
void | DecodeSigned (Asn1OerDecodeBuffer buffer, int octets) |
void | DecodeUnsigned (Asn1OerDecodeBuffer buffer) |
void | DecodeUnsigned (Asn1OerDecodeBuffer buffer, int octets) |
BigInteger | DecodeValue (Asn1DecodeBuffer buffer, int length) |
virtual void | DecodeXER (System.String buffer, System.String attrs) |
override void | DecodeXML (System.String buffer, System.String attrs) |
override int | Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging) |
override void | Encode (Asn1PerEncodeBuffer buffer) |
void | Encode (Asn1PerEncodeBuffer buffer, BigInteger lower, BigInteger upper) |
override void | Encode (Asn1OerEncodeBuffer buffer) |
override void | Encode (Asn1XerEncoder buffer, System.String elemName) |
override void | Encode (Asn1XmlEncoder buffer, System.String elemName, System.String nsPrefix) |
override void | Encode (Asn1BerOutputStream outs, bool explicitTagging) |
override void | Encode (Asn1PerOutputStream outs) |
override void | EncodeAttribute (Asn1XmlEncoder buffer, String attrName) |
void | EncodeSigned (Asn1OerEncodeBuffer buffer, int octets) |
void | EncodeSigned (Asn1OerEncodeBuffer buffer) |
void | EncodeUnsigned (Asn1OerEncodeBuffer buffer) |
void | EncodeUnsigned (Asn1OerEncodeBuffer buffer, int octets) |
virtual bool | Equals (long value) |
override bool | Equals (System.Object value) |
override int | GetHashCode () |
override System.String | ToString () |
Public Member Functions inherited from Asn1Type | |
void | _SetKey (byte[] rtkey) |
virtual void | Decode (Asn1BerDecodeBuffer buffer) |
virtual void | Decode (System.Object reader, System.String xmlURI) |
virtual void | Decode (System.Object reader, System.IO.Stream byteStream) |
virtual void | Decode (Asn1MderDecodeBuffer buffer) |
virtual void | DecodeXML (String buffer, String attrs) |
virtual int | Encode (Asn1BerEncodeBuffer buffer) |
virtual void | Encode (Asn1XerEncoder buffer) |
virtual void | Encode (Asn1XmlEncoder buffer) |
virtual void | Encode (Asn1XmlEncodeBuffer buffer) |
virtual void | Encode (Asn1MderOutputStream buffer) |
virtual void | Encode (Asn1MderOutputStream buffer, bool useCachedLength) |
virtual void | Encode (Asn1CerOutputStream outs, bool explicitTagging) |
void | EncodeAsOpenType (Asn1OerEncodeBuffer buffer) |
virtual void | EncodeAttribute (Asn1XmlEncoder buffer, System.String attrName) |
virtual bool | Equals (Asn1Type obj) |
String | GetNonParameterizedTypeName () |
virtual void | Indent (System.IO.TextWriter outs, int level) |
virtual bool | IsOpenType () |
virtual bool | MatchTypeName (System.String typeName) |
virtual void | Pdiag (System.String s) |
virtual void | Print (System.IO.TextWriter outs, System.String varName, int level) |
virtual void | Print (System.String varName) |
void | SetNonParameterizedTypeName (String value) |
virtual void | SetOpenType () |
Public Attributes | |
BigInteger | mValue |
Public Attributes inherited from Asn1Type | |
const short | BIT_STRING = 3 |
const short | BMPString = 30 |
const short | BOOLEAN = 1 |
const short | DATE = 31 |
const short | ENUMERATED = 10 |
const short | EOC = 0 |
const short | EXTERNAL = 8 |
const short | GeneralString = 27 |
const short | GeneralTime = 24 |
const short | GraphicString = 25 |
const short | IA5String = 22 |
const short | INTEGER = 2 |
const short | NULL = 5 |
const short | NumericString = 18 |
const short | OBJECT_IDENTIFIER = 6 |
const short | ObjectDescriptor = 7 |
const short | OCTET_STRING = 4 |
const short | OpenType = 99 |
const short | PrintableString = 19 |
const short | REAL = 9 |
const short | RELATIVE_OID_IRI = 36 |
const short | RelativeOID = 13 |
const short | SEQUENCE = 16 |
const short | SET = 17 |
const short | T61String = TeletexString |
const short | TeletexString = 20 |
const short | TIME = 14 |
const short | UniversalString = 28 |
const short | UTCTime = 23 |
const short | UTF8String = 12 |
const short | VideotexString = 21 |
const short | VisibleString = 26 |
Static Public Attributes | |
static new readonly Asn1Tag | _TAG = new Asn1Tag(Asn1Tag.UNIV, Asn1Tag.PRIM, Asn1Type.INTEGER) |
Static Public Attributes inherited from Asn1Type | |
static readonly Asn1Tag | _TAG |
Additional Inherited Members | |
Static Public Member Functions inherited from Asn1Type | |
static void | _SetKey2 (byte[] rtkey) |
static void | _SetLicLocation (String path) |
static Asn1Type | Decode (Asn1BerDecodeBuffer buffer, Asn1OpenTypeField openTypeField, bool explicitTag, int implicitLength) |
static Asn1Type | Decode (Asn1OerDecodeBuffer buffer, Asn1OpenTypeField openTypeField) |
static Asn1Type | Decode (Asn1PerDecodeBuffer buffer, Asn1OpenTypeField openTypeField) |
static System.String | GetTypeName (short typeCode) |
Properties inherited from Asn1Type | |
virtual String | AsnTypeName [get] |
virtual int | Length [get] |
This class represents an ASN.1 INTEGER built-in type. In this case, the values can be greater than 64 bits in size. This class is used in generated source code if the <bigInteger> qualifier is specified in a compiler configuration file.
Asn1BigInteger | ( | ) |
The default constructor sets the big integer value object reference to null.
Asn1BigInteger | ( | BigInteger | value | ) |
This constructor assigns a big integer object.
value | BigInteger value |
Asn1BigInteger | ( | System.String | value | ) |
This constructor creates a new big integer object and sets it to the string value passed in. String value may contain the prefix that describes the radix: 0x - hexadecimal, 0o - octal, 0b - binary. The string value without prefix assumes decimal value. The optional sign '-' may be specified at the beginning of the string to specify the negative value.
value | String value |
Asn1BigInteger | ( | System.String | value, |
int | radix | ||
) |
This constructor creates a new big integer object and sets it to the string value passed in. String value may contain the prefix that describes the radix: 0x - hexadecimal, 0o - octal, 0b - binary. The string value without prefix assumes decimal value. The optional sign '-' may be specified at the beginning of the string to specify the negative value.
value | String value |
radix | Can be 16 for hexadecimal, 8 for octal, 2 for binary or 10 for decimal |
|
virtual |
This method decodes an ASN.1 integer value including the UNIVERSAL tag value and length if explicit tagging is specified. This overloaded version uses the Basic Encoding Rules (BER).
buffer | Decode message buffer object |
explicitTagging | Flag indicating element is explicitly tagged |
implicitLength | Length of contents if implicit |
Reimplemented from Asn1Type.
|
virtual |
This method decodes an unconstrained ASN.1 integer value using the Packed Encoding Rules (PER). The length and contents components of the message are decoded. The decoded result is stored in the public mValue
member variable.
buffer | PER Decode message buffer object |
Reimplemented from Asn1Type.
void Decode | ( | Asn1PerDecodeBuffer | buffer, |
BigInteger | lower, | ||
BigInteger | upper | ||
) |
This method decodes an ASN.1 integer value using Packed Encoding Rules (PER). The length and contents components of the message are decoded. The decoded result is stored in the public mValue
member variable.
buffer | PER Decode message buffer object |
lower | The PER-visible lower bound; null if there is not a lower bound. |
upper | The PER-visible upper bound; null if there is not an upper bound. |
References BigInteger.Add(), BigInteger.BitLength(), Asn1PerDecodeBuffer.ByteAlign(), BigInteger.CompareTo(), Asn1PerDecodeBuffer.DecodeBitsToOctetArray(), Asn1PerDecodeBuffer.DecodeConsWholeNumber(), Asn1PerDecodeBuffer.DecodeLength(), BigInteger.Equals(), Asn1PerDecodeBuffer.IsAligned(), BigInteger.LongValue(), BigInteger.Subtract(), and BigInteger.ToString().
|
virtual |
Decode this value as if unconstrained. Subclasses may override this method to decode according to the constraints on the respective ASN.1 type.
Reimplemented from Asn1Type.
void DecodeSigned | ( | Asn1OerDecodeBuffer | buffer | ) |
Decode a variable-size signed integer, encoded with a length, into this object, following OER.
References Asn1OerDecodeBuffer.DecodeLength().
void DecodeSigned | ( | Asn1OerDecodeBuffer | buffer, |
int | octets | ||
) |
Decode a signed integer (2's complement form), of the given length, into this object.
octets | The number of octets in which the value was encoded. |
References Asn1DecodeBitBuffer.DecodeBitsToOctetArray(), Asn1OerDecodeBuffer.DecodeIntSigned(), and BigInteger.SetData().
void DecodeUnsigned | ( | Asn1OerDecodeBuffer | buffer | ) |
Decode a variable-size unsigned integer, encoded with a length, into this object, following OER.
References Asn1OerDecodeBuffer.DecodeLength().
void DecodeUnsigned | ( | Asn1OerDecodeBuffer | buffer, |
int | octets | ||
) |
Decode an unsigned integer (a binary integer, not 2's complement form), of the given length, into this object.
octets | The number of octets in which the value was encoded. |
References Asn1DecodeBitBuffer.DecodeBitsToInt(), Asn1DecodeBitBuffer.DecodeBitsToOctetArray(), Asn1OerDecodeBuffer.DecodeIntUnsigned(), and BigInteger.SetData().
BigInteger DecodeValue | ( | Asn1DecodeBuffer | buffer, |
int | length | ||
) |
This method decodes the contents of an ASN.1 integer value using either the Basic Encoding Rules (BER) or the Packed Encoding Rules (PER).
buffer | Decode message buffer object |
length | Length of encoded contents |
References Asn1EncodeBuffer.Copy(), BigInteger.GetData(), Asn1Type.INTEGER, Diag.Prtln(), Asn1DecodeBuffer.ReadByte(), BigInteger.SetData(), and Asn1MessageBufferBase.TypeCode.
|
virtual |
This method decodes an ASN.1 integer value using the XML encoding rules (XER).
buffer | String containing data to be decoded |
attrs | Attributes string from element tag |
References Asn1XmlXerEncoder.Copy(), Asn1XmlEncoder.EncodeEndElement(), and Asn1XmlEncoder.EncodeStartElement().
override void DecodeXML | ( | System.String | buffer, |
System.String | attrs | ||
) |
This method decodes an ASN.1 integer value using the XML schema encoding rules(asn2xsd).
buffer | String containing data to be decoded |
attrs | Attributes string from element tag |
References Asn1BerOutputStream.EncodeLength(), Asn1BerOutputStream.EncodeTag(), and Asn1OutputStream.Write().
|
virtual |
This method encodes an ASN.1 integer value including the UNIVERSAL tag value and length if explicit tagging is specified. This overloaded version uses the Basic Encoding Rules (BER).
buffer | Encode message buffer object |
explicitTagging | Flag indicating explicit tagging should be done |
Reimplemented from Asn1Type.
References Asn1PerDecodeBuffer.ByteAlign(), Asn1PerDecodeBuffer.DecodeLength(), Asn1BerEncodeBuffer.EncodeTagAndLength(), Asn1Type.INTEGER, Asn1PerTraceHandler.NewBitField(), Asn1PerDecodeBuffer.TraceHandler, and Asn1MessageBufferBase.TypeCode.
|
virtual |
This method encodes an unconstrained ASN.1 integer value using the Packed Encoding Rules (PER). The length and contents components of the message are encoded.
buffer | PER Encode message buffer object |
Reimplemented from Asn1Type.
References Asn1PerEncodeBuffer.EncodeBits(), Asn1PerEncodeBuffer.EncodeLength(), Asn1PerEncodeBuffer.IsAligned(), Asn1PerTraceHandler.NewBitField(), and Asn1PerEncodeBuffer.TraceHandler.
void Encode | ( | Asn1PerEncodeBuffer | buffer, |
BigInteger | lower, | ||
BigInteger | upper | ||
) |
This method encodes an ASN.1 integer value using Packed Encoding Rules (PER).
The length and contents components of the message are encoded.
buffer | PER Encode message buffer object |
lower | The PER-visible lower bound; null if there is not a lower bound. |
upper | The PER-visible upper bound; null if there is not an upper bound. |
References BigInteger.Add(), BigInteger.BitLength(), Asn1PerEncodeBuffer.ByteAlign(), BigInteger.CompareTo(), Asn1PerEncodeBuffer.EncodeBits(), Asn1PerEncodeBuffer.EncodeConsWholeNumber(), Asn1PerEncodeBuffer.EncodeLength(), BigInteger.Equals(), BigInteger.GetData(), Asn1PerEncodeBuffer.IsAligned(), BigInteger.LongValue(), Asn1PerTraceHandler.NewBitField(), BigInteger.Subtract(), and BigInteger.ToString().
|
virtual |
Encode this value as if unconstrained. Subclasses may override this method to encode it according to the constraints on the respective ASN.1 type.
Reimplemented from Asn1Type.
|
virtual |
This method encodes an ASN.1 integer value using the XML encoding rules (XER).
buffer | Encode message buffer object |
elemName | Element name |
Reimplemented from Asn1Type.
|
virtual |
This method encodes an ASN.1 integer value using the XML Encoding as specified in the XML schema standard.
buffer | Encode message buffer object |
elemName | Element name |
nsPrefix | Element namespace prefix name |
Reimplemented from Asn1Type.
|
virtual |
This method encodes and writes to the stream an ASN.1 integer value including the UNIVERSAL tag value and length if explicit tagging is specified. This overloaded version uses the Basic Encoding Rules (BER).
Throws, exception thrown by the underlying System.IO.Stream object.
outs | BER Output Stream object |
explicitTagging | Flag indicating explicit tagging should be done |
Asn1Exception | Thrown, if operation is failed. |
Reimplemented from Asn1Type.
|
virtual |
This method encodes an unconstrained ASN.1 integer value using the Packed Encoding Rules (PER). The length and contents components of the message are encoded.
Also throws any exception thrown by the underlying Asn1PerOutputStream.
outs | PER Output Stream object |
Asn1Exception | Thrown, if operation is failed. |
Reimplemented from Asn1Type.
override void EncodeAttribute | ( | Asn1XmlEncoder | buffer, |
String | attrName | ||
) |
This method encodes an ASN.1 integer value using the XML Encoding as specified in the XML schema standard.
buffer | Encode message buffer object |
elemName | Element name |
attribute | Attribute name |
References Asn1XmlXerEncoder.Copy().
void EncodeSigned | ( | Asn1OerEncodeBuffer | buffer, |
int | octets | ||
) |
Encode integer value as a signed value (2's complement) in the given number of octets.
The value must fit in the given number of octets.
buffer | The buffer. |
octets | The number of octets to encode in; 0 < octets <= 8 |
References BigInteger.BitLength(), Asn1OerEncodeBuffer.EncodeIntSigned(), and BigInteger.LongValue().
void EncodeSigned | ( | Asn1OerEncodeBuffer | buffer | ) |
Encode this value as a variable-size signed integer, with length, according to OER.
References Asn1OerEncodeBuffer.EncodeLength(), and BigInteger.GetData().
void EncodeUnsigned | ( | Asn1OerEncodeBuffer | buffer | ) |
Encode this value as a variable-size unsigned integer, with length, according to OER.
References BigInteger.CompareTo(), Asn1OerEncodeBuffer.EncodeLength(), and BigInteger.GetData().
void EncodeUnsigned | ( | Asn1OerEncodeBuffer | buffer, |
int | octets | ||
) |
Encode integer value as an unsigned value (binary integer) in the given number of octets.
The value must be non-negative and fit in the given number of octets.
buffer | The buffer. |
octets | The number of octets to encode in; 0 < octets <= 8. |
References BigInteger.BitLength(), BigInteger.CompareTo(), Asn1XmlXerEncoder.Copy(), Asn1XerEncoder.EncodeEndElement(), Asn1OerEncodeBuffer.EncodeIntSigned(), Asn1OerEncodeBuffer.EncodeIntUnsigned(), Asn1XerEncoder.EncodeStartElement(), and BigInteger.LongValue().
|
virtual |
This method compares this value to the given integer value for equality.
value | The long value to compare with the current Object. |
true
if the specified long value is equal to the current Object; otherwise, false
. References BigInteger.Equals().
override bool Equals | ( | System.Object | value | ) |
This method compares this value to the given Asn1BigInteger value for equality.
value | The Object to compare with the current Object. Object should be instance of Asn1BigInteger. |
true
if the specified Object is equal to the current Object; otherwise, false
. References BigInteger.Equals(), and Asn1BigInteger.mValue.
override int GetHashCode | ( | ) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
References BigInteger.GetHashCode().
override System.String ToString | ( | ) |
This method will return a string representation of the integer value. The format is the ASN.1 value format for this type..
References BigInteger.ToString().
|
static |
The _TAG
constant describes the universal tag for this data type (UNIVERSAL 2).
BigInteger mValue |
The magnitude of this Asn1BigInteger, in big-endian order: the zeroth element of this array is the most-significant int of the magnitude. The magnitude must be "minimal" in that the most-significant int (mValue[0]
) must be non-zero. This is necessary to ensure that there is exactly one representation for each Asn1BigInteger value. Note that this implies that the Asn1BigInteger zero has a zero-length mValue array.
Referenced by Asn1BigInteger.Equals().