|
|
 |
 |
|
Asn1UniversalString Class ReferenceInheritance diagram for Asn1UniversalString:
List of all members.
Detailed Description
This is a container class for holding the components of an ASN.1 Universal string value.
|
Public Member Functions |
| | Asn1UniversalString (System.String value) |
| | Asn1UniversalString (int[] value) |
| | Asn1UniversalString () |
| virtual void | Decode (Asn1PerDecodeBuffer buffer, Asn1CharSet charSet, long lower, long upper) |
| virtual void | Decode (Asn1PerDecodeBuffer buffer, Asn1CharSet charSet) |
| override void | Decode (Asn1PerDecodeBuffer buffer) |
| override void | Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) |
| virtual void | DecodeXER (System.String buffer, System.String attrs) |
| virtual void | DecodeXML (System.String buffer, System.String attrs) |
| virtual void | Encode (Asn1PerOutputStream outs, Asn1CharSet charSet, long lower, long upper) |
| virtual void | Encode (Asn1PerOutputStream outs, Asn1CharSet charSet) |
| override void | Encode (Asn1PerOutputStream outs) |
| override void | Encode (Asn1BerOutputStream outs, bool explicitTagging) |
| override void | Encode (Asn1XerEncoder buffer, System.String elemName, System.String attribute) |
| override void | Encode (Asn1XerEncoder buffer, System.String elemName) |
| virtual void | Encode (Asn1PerEncodeBuffer buffer, Asn1CharSet charSet, long lower, long upper) |
| virtual void | Encode (Asn1PerEncodeBuffer buffer, Asn1CharSet charSet) |
| override void | Encode (Asn1PerEncodeBuffer buffer) |
| override int | Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging) |
| virtual void | EncodeData (Asn1XerEncoder buffer) |
| override bool | Equals (System.Object value) |
| override int | GetHashCode () |
| override System.String | ToString () |
Public Attributes |
| const int | BITSPERCHAR = 32 |
| int[] | mValue |
Static Public Attributes |
| static new readonly Asn1Tag | _TAG |
Protected Member Functions |
| virtual internal void | Decode (Asn1PerDecodeBuffer buffer, int abpc, int ubpc, Asn1CharSet charSet, long lower, long upper) |
| virtual internal void | Decode (Asn1PerDecodeBuffer buffer, int nchars, int abpc, int ubpc, Asn1CharSet charSet, int startIdx) |
| virtual internal void | Decode (Asn1PerDecodeBuffer buffer, int abpc, int ubpc, Asn1CharSet charSet) |
| virtual internal void | Encode (Asn1PerOutputStream outs, int abpc, int ubpc, Asn1CharSet charSet, long lower, long upper) |
| virtual internal void | Encode (Asn1PerOutputStream outs, int abpc, int ubpc, Asn1CharSet charSet) |
| virtual internal void | Encode (Asn1PerOutputStream outs, int nchars, int offset, int abpc, int ubpc, Asn1CharSet charSet) |
| virtual internal void | Encode (Asn1PerEncodeBuffer buffer, int abpc, int ubpc, Asn1CharSet charSet, long lower, long upper) |
| virtual internal void | Encode (Asn1PerEncodeBuffer buffer, int abpc, int ubpc, Asn1CharSet charSet) |
| virtual internal void | Encode (Asn1PerEncodeBuffer buffer, int nchars, int offset, int abpc, int ubpc, Asn1CharSet charSet) |
Protected Attributes |
| internal System.Text.StringBuilder | mStringBuffer |
Properties |
| override int | Length |
Constructor & Destructor Documentation
|
|
This constructor creates an empty string that can be used in a Decode method call to receive a string value. |
|
|
This constructor initializes the universal string from the given an array of 32-bit integer value.
- Parameters:
-
| value | universal string value as array of 32-bit int |
|
|
|
This constructor converts a standard C# string value into a universal string.
- Parameters:
-
| value | universal string value as string |
|
Member Function Documentation
|
|
This overloaded version of the Decode method decodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes a size constraint is present but no permitted alphabet constraint.
The decoded result is stored in the public mValue member variable.
- Parameters:
-
| buffer | Decode message buffer object |
| abpc | Number of bits per character (aligned) |
| ubpc | Number of bits per character (unaligned) |
| charSet | Object representing permitted alphabet constraint character set (optional) |
| lower | Effective size constraint lower bound |
| upper | Effective size constraint upper bound |
|
|
|
This method decodes the contents of a UniversalString. This version of the method assumes a permitted alphabet constraint is in place.
- Parameters:
-
| buffer | Decode message buffer object |
| 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) |
| startIdx | Start index to fill in value array |
|
|
|
This method decodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes that a permitted alphabet constraint has been specified that would reduce the the number of bits-per-character from the default character set. It also assumes a general length determinant is present (i.e. there is not size constraint). The decoded result is stored in the public mValue member variable.
- Parameters:
-
| buffer | Decode message buffer object |
| abpc | Number of bits per character (aligned) |
| ubpc | Number of bits per character (unaligned) |
| charSet | Object representing the permitted alphabet constraint character set (optional) |
|
|
|
This overloaded version of the Decode method decodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes a size constraint is present but no permitted alphabet constraint.
The decoded result is stored in the public mValue member variable.
- Parameters:
-
| buffer | Decode message buffer object |
| charSet | Object representing permitted alphabet constraint character set (optional) |
| lower | Effective size constraint lower bound |
| upper | Effective size constraint upper bound |
|
|
|
This method decodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes no size constraints but allows a permitted alphabet character set to be specified. Decoded characters are assigned as-is to the output string. The decoded result is stored in the public mValue member variable.
- Parameters:
-
| buffer | Decode message buffer object |
| charSet | Object representing permitted alphabet constraint character set (optional) |
|
|
|
This method decodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes no permitted alphabet or size constraints. Decoded characters are assigned as-is to the output string. The decoded result is stored in the public mValue member variable.
- Parameters:
-
| buffer | Decode message buffer object |
Reimplemented from Asn1Type. |
| override void Decode |
( |
Asn1BerDecodeBuffer |
buffer, |
|
|
bool |
explicitTagging, |
|
|
int |
implicitLength |
|
) |
[virtual] |
|
|
|
This method decodes an ASN.1 universal string value including the UNIVERSAL tag value and length if explicit tagging is specified.
- Parameters:
-
| buffer | Decode message buffer object |
| explicitTagging | Flag indicating element is explicitly tagged |
| implicitLength | Length of contents if implicit |
Reimplemented from Asn1Type. |
| virtual void DecodeXER |
( |
System.String |
buffer, |
|
|
System.String |
attrs |
|
) |
[virtual] |
|
|
|
This method decodes an ASN.1 Universal String value using the XML encoding rules (XER).
- Parameters:
-
| buffer | String containing data to be decoded |
| attrs | Attributes string from element tag |
|
| virtual void DecodeXML |
( |
System.String |
buffer, |
|
|
System.String |
attrs |
|
) |
[virtual] |
|
|
|
This method decodes an ASN.1 Universal String value using the XML schema encoding rules(asn2xsd).
- Parameters:
-
| buffer | String containing data to be decoded |
| attrs | Attributes string from element tag |
|
|
|
This overloaded version of the encode method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes a size constraint is present but no permitted alphabet constraint.
The value to encode is stored in the public mValue member variable.
Also throws any exception thrown by the Asn1PerOutputStream. - Parameters:
-
| outs | PER Output Stream object |
| abpc | Number of bits per character (aligned) |
| ubpc | Number of bits per character (unaligned) |
| charSet | Object representing the permitted alphabet constraint character set (optional) |
| lower | Effective size constraint lower bound |
| upper | Effective size constraint upper bound |
- Exceptions:
-
|
|
|
This method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes no permitted alphabet or size constraints.
The value to encode is stored in the public mValue member variable.
Also throws any exception thrown by the Asn1PerOutputStream. - Parameters:
-
| outs | PER Output Stream object |
| abpc | Number of bits per character (aligned) |
| ubpc | Number of bits per character (unaligned) |
| charSet | Object representing the permitted alphabet constraint character set (optional) |
- Exceptions:
-
|
|
|
This method encodes the contents of a UniversalString type. This version assumes a permitted alphabet constraint was specified.
Also throws any exception thrown by the Asn1PerOutputStream. - Parameters:
-
| outs | PER Output Stream object |
| nchars | Number of characters from string to encode |
| offset | Offset to first char in string to encode |
| abpc | Number of bits per character (aligned) |
| ubpc | Number of bits per character (unaligned) |
| charSet | Object representing permitted alphabet constraint character set (optional) |
- Exceptions:
-
|
|
|
This overloaded version of the encode method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes both a size constraint and permitted alphabet constraint are present.
The value to encode is stored in the public mValue member variable.
Also throws any exception thrown by the Asn1PerOutputStream. - Parameters:
-
| outs | PER Output Stream object |
| charSet | Object representing the permitted alphabet constraint character set |
| lower | Effective size constraint lower bound |
| upper | Effective size constraint upper bound |
- Exceptions:
-
|
|
|
This method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes no size constraints but does allow a permitted alphabet character set to be specified.
The value to encode is stored in the public mValue member variable.
Also throws any exception thrown by the Asn1PerOutputStream. - Parameters:
-
| outs | PER Output Stream object |
| charSet | Object representing permitted alphabet constraint character set (optional) |
- Exceptions:
-
|
|
|
This method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes no permitted alphabet or size constraints.
The value to encode is stored in the public mValue member variable.
Also throws any exception thrown by the Asn1PerOutputStream. - Parameters:
-
| outs | PER Output Stream object |
- Exceptions:
-
Reimplemented from Asn1Type. |
|
|
This method encodes and writes to the stream an ASN.1 universal string 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 C# System.IO.Stream for I/O error - Parameters:
-
| outs | BER Output Stream object |
| explicitTagging | Flag indicating explicit tagging should be done |
- Exceptions:
-
Reimplemented from Asn1Type. |
| override void Encode |
( |
Asn1XerEncoder |
buffer, |
|
|
System.String |
elemName, |
|
|
System.String |
attribute |
|
) |
[virtual] |
|
|
|
This method encodes an ASN.1 Universal String value with element and attribute name tag using the XML Encoding as specified in the XML schema standard(asn2xsd).
- Parameters:
-
| buffer | Encode message buffer object |
| elemName | Element name |
| attribute | Element attribute value |
Reimplemented from Asn1Type. |
| override void Encode |
( |
Asn1XerEncoder |
buffer, |
|
|
System.String |
elemName |
|
) |
[virtual] |
|
|
|
This method encodes an ASN.1 Universal String value using the XML encoding rules (XER).
- Parameters:
-
| buffer | Encode message buffer object |
| elemName | Element name |
Reimplemented from Asn1Type. |
|
|
This overloaded version of the encode method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes a size constraint is present but no permitted alphabet constraint.
The value to encode is stored in the public mValue member variable.
- Parameters:
-
| buffer | Encode message buffer object |
| abpc | Number of bits per character (aligned) |
| ubpc | Number of bits per character (unaligned) |
| charSet | Object representing the permitted alphabet constraint character set (optional) |
| lower | Effective size constraint lower bound |
| upper | Effective size constraint upper bound |
|
|
|
This method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes no permitted alphabet or size constraints.
The value to encode is stored in the public mValue member variable.
- Parameters:
-
| buffer | Encode message buffer object |
| abpc | Number of bits per character (aligned) |
| ubpc | Number of bits per character (unaligned) |
| charSet | Object representing the permitted alphabet constraint character set (optional) |
|
|
|
This method encodes the contents of a UniversalString type. This version assumes a permitted alphabet constraint was specified.
- Parameters:
-
| buffer | Encode message buffer object |
| nchars | Number of characters from string to encode |
| offset | Offset to first char in string to encode |
| abpc | Number of bits per character (aligned) |
| ubpc | Number of bits per character (unaligned) |
| charSet | Object representing permitted alphabet constraint character set (optional) |
|
|
|
This overloaded version of the encode method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes both a size constraint and permitted alphabet constraint are present.
The value to encode is stored in the public mValue member variable.
- Parameters:
-
| buffer | Encode message buffer object |
| charSet | Object representing the permitted alphabet constraint character set |
| lower | Effective size constraint lower bound |
| upper | Effective size constraint upper bound |
|
|
|
This method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes no size constraints but does allow a permitted alphabet character set to be specified.
The value to encode is stored in the public mValue member variable.
- Parameters:
-
| buffer | Encode message buffer object |
| charSet | Object representing permitted alphabet constraint character set (optional) |
|
|
|
This method encodes an ASN.1 UniversalString value in accordance with the packed encoding rules (PER). This version of the method assumes no permitted alphabet or size constraints.
The value to encode is stored in the public mValue member variable.
- Parameters:
-
| buffer | Encode message buffer object |
Reimplemented from Asn1Type. |
|
|
This method encodes an ASN.1 universal string type. The UNIVERSAL tag value and length is also encoded if explicit tagging is specified.
- Parameters:
-
| buffer | Encode message buffer object |
| explicitTagging | Flag indicating explicit tagging should be done |
- Returns:
- Length in octets of encoded component
Reimplemented from Asn1Type. |
|
|
This method encodes an ASN.1 Universal String value using the XML Encoding as specified in the XML schema standard(asn2xsd).
- Parameters:
-
| buffer | Encode message buffer object |
|
| override bool Equals |
( |
System.Object |
value |
) |
|
|
|
|
This method compares this character string value to the given value for equality.
- Parameters:
-
| value | The Object to compare with the current Object. Object should be instance of Asn1UniversalString. |
- Returns:
true if the specified Object is equal to the current Object; otherwise, false.
|
| 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. - Returns:
- A hash code for the current Object.
|
| override System.String ToString |
( |
|
) |
|
|
|
|
This method will return a string representation of the value. The format is the ASN.1 value format for this type..
- Returns:
- Stringified representation of the value
|
Member Data Documentation
|
|
The _TAG constant describes the universal tag for this data type (UNIVERSAL 28).
Reimplemented from Asn1Type. |
|
|
The BITSPERCHAR constant specifies the number of bits per character for PER (aligned or unaligned). |
|
|
Variable holds the string representation of the value |
|
|
The mValue public member variable is used to hold the string value to be encoded or the results of a Decode operation. For UniversalString, the characters are stored in an array of 32-bit integer values. |
Property Documentation
override int Length [get] |
|
|
|
Gets the length of the character string in characters.
Value: number of characters.
Reimplemented from Asn1Type. |
|
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.
|
This file was last modified on
18 Nov 2005. ASN1C C# Runtime Library, 5.8 |
|