|
|
 |
 |
|
Asn1CharString Class ReferenceInheritance diagram for Asn1CharString:
List of all members.
Detailed Description
This is a container class for holding the components of an ASN.1 character string value. Subclasses are defined for all of the different string types.
|
Public Member Functions |
| virtual void | DecodeXER (System.String buffer, System.String attrs) |
| virtual void | DecodeXML (System.String buffer, System.String attrs) |
| override void | Encode (Asn1XerEncoder buffer, System.String elemName, System.String attribute) |
| override void | Encode (Asn1XerEncoder buffer, System.String elemName) |
| override bool | Equals (System.Object value) |
| bool | Equals (System.String value) |
| override int | GetHashCode () |
| override System.String | ToString () |
Public Attributes |
| System.String | mValue |
Protected Member Functions |
| internal | Asn1CharString (System.String data, short typeCode) |
| internal | Asn1CharString (short typeCode) |
| virtual internal void | Decode (Asn1PerDecodeBuffer buffer, int abpc, int ubpc, Asn1CharSet charSet, long lower, long upper) |
| virtual internal void | Decode (Asn1PerDecodeBuffer buffer, int abpc, int ubpc, Asn1CharSet charSet) |
| virtual internal void | Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength, Asn1Tag tag) |
| 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 int | Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging, Asn1Tag tag) |
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.
- Parameters:
-
| typeCode | Universal ID code for ASN.1 character string |
|
| internal Asn1CharString |
( |
System.String |
data, |
|
|
short |
typeCode |
|
) |
[protected] |
|
|
|
This constructor initializes a character string from the given string data.
- Parameters:
-
| data | Character string |
| typeCode | Universal ID code for ASN.1 character string |
|
Member Function Documentation
|
|
This overloaded version of the Decode method decodes an ASN.1 character string 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 an ASN.1 character string 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) |
|
| virtual internal void Decode |
( |
Asn1BerDecodeBuffer |
buffer, |
|
|
bool |
explicitTagging, |
|
|
int |
implicitLength, |
|
|
Asn1Tag |
tag |
|
) |
[protected, virtual] |
|
|
|
This method decodes an ASN.1 character string value including the UNIVERSAL tag value and length if explicit tagging is specified. It is a protected method that can only be accessed by objects subclassed from this type.
- Parameters:
-
| buffer | Decode message buffer object |
| explicitTagging | Flag indicating element is explicitly tagged |
| implicitLength | Length of contents if implicit |
| tag | Universal tag to apply |
Reimplemented in Asn1Time. |
| virtual void DecodeXER |
( |
System.String |
buffer, |
|
|
System.String |
attrs |
|
) |
[virtual] |
|
|
|
This method decodes ASN.1 8-bit character string types including IA5String, PrintableString, NumericString, etc. 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 ASN.1 8-bit character string types including IA5String, PrintableString, NumericString, etc. using the XML Schema encoding rules(asn2xsd).
- Parameters:
-
| buffer | String containing data to be decoded |
| attrs | Attributes string from element tag |
Reimplemented in Asn1Time. |
| override void Encode |
( |
Asn1XerEncoder |
buffer, |
|
|
System.String |
elemName, |
|
|
System.String |
attribute |
|
) |
[virtual] |
|
|
|
This method encodes ASN.1 8-bit character string types including IA5String, PrintableString, NumericString, etc. using the XML Encoding as specified in the XML schema standard(asn2xsd).
- Parameters:
-
| buffer | Encode message buffer object |
| elemName | XML element name used to wrap string |
| attribute | XML element attribute value |
Reimplemented from Asn1Type.
Reimplemented in Asn1GeneralizedTime, and Asn1UTCTime. |
| override void Encode |
( |
Asn1XerEncoder |
buffer, |
|
|
System.String |
elemName |
|
) |
[virtual] |
|
|
|
This method encodes ASN.1 8-bit character string types including IA5String, PrintableString, NumericString, etc. using the XML encoding rules (XER).
- Parameters:
-
| buffer | Encode message buffer object |
| elemName | XML element name used to wrap string |
Reimplemented from Asn1Type. |
|
|
This overloaded version of the encode method encodes an ASN.1 character string 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 character string 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 ASN.1 8-bit character string types including IA5String, PrintableString, NumericString, etc. The UNIVERSAL tag value and length is also encoded if explicit tagging is specified (the universal identifier must be provided by the caller).
- Parameters:
-
| buffer | Encode message buffer object |
| explicitTagging | Flag indicating explicit tagging should be done |
| tag | Universal tag to apply |
- Returns:
- Length in octets of encoded component
Reimplemented in Asn1Time. |
| 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 Asn1CharString. |
- Returns:
true if the specified Object is equal to the current Object; otherwise, false.
Reimplemented in Asn1Time. |
| bool Equals |
( |
System.String |
value |
) |
|
|
|
|
This method compares this character string value to the given value for equality.
- Parameters:
-
| value | The String value to compare with the current Object. |
- Returns:
true if the specified string 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.
Reimplemented in Asn1Time. |
| 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 mStringBuffer member variable is used to do internal operations on a string being encoded or decoded. |
|
|
The mValue public member variable is used to hold the string value to be encoded or the results of a Decode operation. |
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 |
|