ASN1C C# Runtime Library
7.7
|
Static Public Member Functions | |
static byte [] | ParseString (System.String data, IntHolder numbits) |
static byte [] | ParseString (System.String data) |
static bool | StringEqualsBytes (String value, byte[] data) |
static bool | StringEqualsBytes (String value, byte[] data, int nbits) |
This class provides methods for parsing and formatting text in ASN.1 value notation.
|
static |
This static method parses the given ASN.1 value text (either a binary or hex data string) and returns the value in a binary byte array. The number of bits is also returned.
Examples of valid value formats are as follows:
Binary string: '11010010111001'B
Hex string: '0fa56920014abc'H
Char string: 'abcdefg'
data | The ASN.1 value specification text |
numbits | Holder to receive number of bits in string |
References IntHolder.mValue, and Diag.Prtln().
Referenced by Asn1BitString.Asn1BitString(), and Asn1OctetString.Asn1OctetString().
|
static |
This overloaded version of the ParseString method sets the numbits holder value to null.
data | The ASN.1 value specification text |
|
static |
This static method parses the given ASN.1 value text (either a binary or hex data string) and compares it with the given byte array. Examples of valid value formats are as follows: Binary string: '11010010111001'B Hex string: '0fa56920014abc'H Char string: 'abcdefg'
value | The ASN.1 value specification text |
data | Array of bytes to compare string with. |
Referenced by Asn1OctetString.Equals(), and Asn1BitString.Equals().
|
static |
This static method parses the given ASN.1 value text (either a binary or hex data string) and compares it with the given byte array. This version of the method allows you to specify a number of bits to compare, which is useful when dealing with bit strings, as opposed to octet strings.
Examples of valid value formats are as follows: Binary string: '11010010111001'B Hex string: '0fa56920014abc'H Char string: 'abcdefg' /p>
value | The ASN.1 value specification text |
data | Array of bytes to compare string with. |
nbits | Number of bits in data to compare. |