ASN1C C# Runtime Library
7.4
|
Public Member Functions | |
Asn1OctetString () | |
Asn1OctetString (byte[] data) | |
Asn1OctetString (byte[] data, int offset, int nbytes) | |
Asn1OctetString (System.String value) | |
virtual int | CompareTo (System.Object octstr) |
override void | Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) |
override void | Decode (Asn1PerDecodeBuffer buffer) |
virtual void | Decode (Asn1PerDecodeBuffer buffer, long lower, long upper) |
virtual void | DecodeXER (System.String buffer, System.String attrs, bool base64) |
override void | DecodeXML (System.String buffer, System.String attrs) |
override int | Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging) |
override void | Encode (Asn1PerEncodeBuffer buffer) |
virtual void | Encode (Asn1PerEncodeBuffer buffer, long lower, long upper) |
override void | Encode (Asn1XerEncoder buffer, System.String elemName) |
override void | Encode (Asn1XmlEncoder buffer, System.String elemName, System.String nsPrefix) |
virtual void | Encode (Asn1XmlEncoder buffer, System.String elemName, System.String nsPrefix, bool base64) |
override void | Encode (Asn1BerOutputStream outs, bool explicitTagging) |
override void | Encode (Asn1PerOutputStream outs) |
virtual void | Encode (Asn1PerOutputStream outs, long lower, long upper) |
override void | EncodeAttribute (Asn1XmlEncoder buffer, System.String attrName) |
bool | Equals (byte[] value) |
bool | Equals (String s) |
override bool | Equals (System.Object value) |
override int | GetHashCode () |
virtual System.IO.Stream | toInputStream () |
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 | DecodeXML (String buffer, String attrs) |
virtual int | Encode (Asn1BerEncodeBuffer buffer) |
virtual void | Encode (Asn1XerEncoder buffer) |
virtual void | Encode (Asn1XmlEncoder buffer) |
virtual void | Encode (Asn1CerOutputStream outs, bool explicitTagging) |
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 () |
Static Public Member Functions | |
static System.String | EncodeBase64Binary (byte[] data) |
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 (Asn1PerDecodeBuffer buffer, Asn1OpenTypeField openTypeField) |
static System.String | GetTypeName (short typeCode) |
Public Attributes | |
byte [] | 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 |
Static Public Attributes inherited from Asn1Type | |
static readonly Asn1Tag | _TAG |
Properties | |
override int | Length [get] |
Properties inherited from Asn1Type | |
virtual String | AsnTypeName [get] |
virtual int | Length [get] |
This is a container class for holding the components of an ASN.1 octet string value.
Asn1OctetString | ( | ) |
This constructor creates an empty octet string that can be used in a Decode method call to receive an octet string value.
Asn1OctetString | ( | byte [] | data | ) |
This constructor initializes an octet string from the given byte array.
data | Byte array containing an octet string in binary form. |
Asn1OctetString | ( | byte [] | data, |
int | offset, | ||
int | nbytes | ||
) |
This constructor initializes an octet string from a portion of the given byte array. A new byte array is created starting at the given offset and consisting of the given number of bytes.
data | Byte array containing an octet string in binary form. |
offset | The offset in array at which to begin copy. |
nbytes | Number of bytes to copy from target array |
Asn1OctetString | ( | System.String | value | ) |
This constructor parses the given ASN.1 value text (either a binary or hex data string) and assigns the values to the internal bit string.
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 |
References Asn1Value.ParseString().
|
virtual |
This method compares two Asn1OctetString objects for equality. The OCTET STRING's are equal if a) all octets are equal, and b) the lengths are the same.
This method is required to implement the Comparable interface used for sorting.
octstr | Asn1OctetString to compare |
References Asn1PerDecodeBuffer.ByteAlign(), Asn1Tag.Constructed, Asn1EncodeBuffer.Copy(), Asn1PerDecodeBuffer.DecodeBitsToOctetArray(), Asn1PerDecodeBuffer.DecodeLength(), Asn1BerEncodeBuffer.EncodeTagAndLength(), Asn1Tag.EOC, Asn1BerDecodeContext.Expired(), Asn1Status.INDEFLEN, Asn1BerDecodeBuffer.LastTag, Asn1Type.OCTET_STRING, Diag.Prtln(), Asn1DecodeBuffer.Read(), and Asn1MessageBufferBase.TypeCode.
|
virtual |
This method decodes an ASN.1 octet string value including the UNIVERSAL tag value and length if explicit tagging is specified.
buffer | Decode message buffer object |
explicitTagging | Flag indicating element is explicitly tagged |
implicitLength | Length of contents if implicit |
Reimplemented from Asn1Type.
Reimplemented in Asn1OpenType.
Referenced by Asn1UTF8String.Asn1UTF8String(), and Asn1OctetString.Decode().
|
virtual |
This method decodes an ASN.1 octet string value using the packed encoding rules (PER). The string is assumed to not contain a size constraint.
buffer | Decode message buffer object |
Reimplemented from Asn1Type.
Reimplemented in Asn1OpenType.
|
virtual |
This method decodes a sized ASN.1 octet string value using the packed encoding rules (PER).
buffer | Decode message buffer object |
lower | Lower bound (inclusive) of size constraint |
upper | Upper bound (inclusive) of size constraint |
References Asn1PerDecodeBuffer.ByteAlign(), Asn1OctetString.Decode(), Asn1PerDecodeBuffer.DecodeBitsToOctetArray(), Asn1PerDecodeBuffer.DecodeLength(), Asn1OctetString.mValue, Asn1Type.OCTET_STRING, and Asn1MessageBufferBase.TypeCode.
|
virtual |
This method decodes ASN.1 octet string type using the XML encoding rules (XER). Extended-XER is supported by the base64
buffer | String containing data to be decoded |
attrs | Attributes string from element tag |
base64 | pass true if encoding is base64 (extended-XER only) |
References Asn1Util.DecodeBase64Array().
override void DecodeXML | ( | System.String | buffer, |
System.String | attrs | ||
) |
This method decodes an ASN.1 octet string type using the XML schema encoding rules(asn2xsd).
buffer | String containing data to be decoded |
attrs | Attributes string from element tag |
References Asn1Util.DecodeBase64Array().
|
virtual |
This method encodes an ASN.1 octet string value including the UNIVERSAL tag value and length if explicit tagging is specified.
buffer | Encode message buffer object |
explicitTagging | Flag indicating explicit tagging should be done |
Reimplemented from Asn1Type.
Reimplemented in Asn1OpenType.
|
virtual |
This method encodes an unconstrained ASN.1 octet string value using the packed encoding rules (PER). The value to be encoded is stored in the 'mValue' public member variable within this class.
buffer | Encode message buffer object |
Reimplemented from Asn1Type.
Reimplemented in Asn1OpenType.
References Asn1PerEncodeBuffer.EncodeOctetString().
|
virtual |
This method encodes a size-constrained ASN.1 octet string value using the packed encoding rules (PER). The value to be encoded is stored in the 'mValue' public member variable within this class.
buffer | Encode message buffer object |
lower | Lower bound (inclusive) of size constraint |
upper | Upper bound (inclusive) of size constraint |
References Asn1PerEncodeBuffer.ByteAlign(), Asn1PerEncodeBuffer.EncodeBits(), Asn1XerEncoder.EncodeEmptyElement(), Asn1XerEncoder.EncodeEndElement(), Asn1XmlXerEncoder.EncodeHexStrValue(), Asn1PerEncodeBuffer.EncodeLength(), Asn1PerEncodeBuffer.EncodeOctetString(), Asn1XerEncoder.EncodeStartElement(), and Asn1XmlXerEncoder.Indent().
|
virtual |
This method encodes ASN.1 octet string type using the XML encoding rules (XER).
buffer | Encode message buffer object |
elemName | XML element name used to wrap string |
Reimplemented from Asn1Type.
|
virtual |
This method encodes ASN.1 octet string type as an xmlhstring.
buffer | Encode message buffer object |
elemName | XML element name used to wrap string |
nsPrefix | Element namespace value |
Reimplemented from Asn1Type.
|
virtual |
This method encodes ASN.1 octet string type using the XML Encoding as specified in the XML schema standard(asn2xsd).
buffer | Encode message buffer object |
elemName | XML element name used to wrap string |
nsPrefix | Element namespace value |
base64 | Pass true to encode as base64 (extended-XER only, including XSD compilation) |
References Asn1XmlXerEncoder.Copy(), Asn1XmlEncoder.EncodeEmptyElement(), Asn1XmlEncoder.EncodeEndElement(), Asn1XmlXerEncoder.EncodeHexStrValue(), Asn1XmlEncoder.EncodeStartElement(), and Asn1XmlXerEncoder.Indent().
|
virtual |
This method encodes and writes to the stream an ASN.1 octet string 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 C# System.IO.Stream for I/O error
outs | BER Output Stream object |
explicitTagging | Flag indicating explicit tagging should be done |
Asn1Exception | Thrown, if operation is failed. |
Reimplemented from Asn1Type.
Reimplemented in Asn1OpenType.
|
virtual |
This method encodes an unconstrained ASN.1 octet string value using the packed encoding rules (PER). The value to be encoded is stored in the 'mValue' public member variable within this class.
Also throws any exception thrown by the underlying Asn1PerOutputStream.
outs | PER Output Stream object |
Asn1Exception | Thrown, if operation is failed. |
Reimplemented from Asn1Type.
Reimplemented in Asn1OpenType.
|
virtual |
This method encodes a size-constrained ASN.1 octet string value using the packed encoding rules (PER). The value to be encoded is stored in the 'mValue' public member variable within this class.
Also throws any exception thrown by the underlying Asn1PerOutputStream.
outs | PER Output Stream object |
lower | Lower bound (inclusive) of size constraint |
upper | Upper bound (inclusive) of size constraint |
Asn1Exception | Thrown, if operation is failed. |
|
virtual |
This method encodes ASN.1 octet string type using the XML Encoding as specified in the XML schema standard(asn2xsd).
buffer | Encode message buffer object |
elemName | XML element name used to wrap string |
attribute | Element attribute value |
Reimplemented from Asn1Type.
References Asn1XmlXerEncoder.Copy().
|
static |
Encodes xsd:Base64Binary data into ASCII character using the algorithm defined in RFC2045, as defined in w3c stadard http://www.w3.org/tr/2001/rec-xmlschema-2-20010502#base64Binary
base64binary | Array containing base64binary |
References Asn1Tag.PRIM, and Asn1Tag.UNIV.
Referenced by Asn1XmlEncodeBuffer.EncodeXSIAttrs().
bool Equals | ( | byte [] | value | ) |
This method compares this octet string value to the given value for equality.
value | The byte array to compare with the current Object. |
true
if the specified byte array is equal to the current Object; otherwise, false
. bool Equals | ( | String | s | ) |
This method compares the given ASN.1 OCTET STRING value to this OCTET STRING value for equality.
value | The ASN.1 OCTET STRING value to compare with the current Object. Examples of valid value formats are as follows: Binary string: '11010010111001'B Hex string: '0fa56920014abc'H |
true
if the specified value is equal to this value; otherwise, false
. References Asn1Value.StringEqualsBytes().
override bool Equals | ( | System.Object | value | ) |
This method compares this octet string value to the given value for equality.
value | The Object to compare with the current Object. Object should be instance of Asn1OctetString. |
true
if the specified Object is equal to the current Object; otherwise, false
. References Asn1OctetString.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.
|
virtual |
This method will return a byte array input stream representation of the octet string value.
override System.String ToString | ( | ) |
This method will return a string representation of the octet string value. The format is the ASN.1 value format for this type..
References Asn1BerOutputStream.EncodeOctetString(), Asn1PerEncodeBuffer.EncodeOctetString(), and Asn1Util.ToHexString().
|
static |
The _TAG
constant describes the universal tag for this data type (UNIVERSAL 4).
Referenced by Asn1BMPString.Decode(), Asn1UniversalString.Decode(), Asn1CerOutputStream.EncodeBMPString(), Asn1CerOutputStream.EncodeOctetString(), Asn1CerOutputStream.EncodeUnivString(), and Asn1CharString.validate().
byte [] mValue |
This variable holds the octet string value. These are the octets that are encoded when encode is invoked. It is also where the decoded octet string is stored after a Decode operation.
Referenced by Asn1UTF8String.Asn1UTF8String(), Asn1OctetString.Decode(), Asn1OpenType.SaxHandler.EndElement(), and Asn1OctetString.Equals().
|
get |
Gets the length of the OCTET STRING in octets.
Value:
length of the octet string