ASN1C C# Runtime Library
7.5
|
Public Member Functions | |
Asn1Tag () | |
Asn1Tag (short tagclass, short form, int idCode) | |
virtual bool | Equals (short tagclass, short form, int idCode) |
bool | Equals (Asn1Tag tag) |
virtual bool | IsEOC () |
override System.String | ToString () |
Public Attributes | |
const short | APPL = (short) (0x40) |
const short | Bit8Mask = (short) (0x80) |
const short | ClassMask = (short) (0xC0) |
const short | CONS = (short) (0x20) |
const short | CTXT = (short) (0x80) |
const bool | EXPL = true |
const short | EXTIDCODE = (short) (0x1F) |
const short | FormMask = (short) (0x20) |
const short | IDMask = (short) (0x1F) |
const bool | IMPL = false |
const short | L7BitsMask = (short) (0x7f) |
short | mClass |
short | mForm |
int | mIDCode |
const short | PRIM = (short) (0x00) |
const short | PRIV = (short) (0xC0) |
const short | UNIV = (short) (0x00) |
Static Public Attributes | |
static readonly Asn1Tag | ENUM |
static readonly Asn1Tag | EOC |
static readonly Asn1Tag | SEQUENCE |
static readonly Asn1Tag | SET |
Properties | |
virtual bool | Constructed [get] |
This is a container class for holding the components of an ASN.1 tag value.
Asn1Tag | ( | ) |
The default constructor initializes all fields to zero
Asn1Tag | ( | short | tagclass, |
short | form, | ||
int | idCode | ||
) |
This constructor initializes all fields to the given values
tagclass | Tag class value (UNIV, APPL, CTXT, or PRIV) |
form | Tag form value (PRIM or CONS) |
idCode | Tag identifier code |
|
virtual |
This method compares this tag with the given tag value for equality.
tagclass | Tag class value (UNIV, APPL, CTXT, or PRIV) |
form | Tag form value (PRIM or CONS) |
idCode | Tag identifier code |
true
if the specified Tags are equal; otherwise, false
. Referenced by Asn1BerDecodeBuffer.MatchTag().
bool Equals | ( | Asn1Tag | tag | ) |
This method compares this tag with the given tag value for equality.
tag | Asn1Tag object to which this tag is to be compared |
true
if the specified Tags are equal; otherwise, false
. References Asn1Tag.mClass, Asn1Tag.mForm, and Asn1Tag.mIDCode.
|
virtual |
This method tests if the tag is an end-of-contents (EOC) tag.
References Asn1Type.EOC.
Referenced by Asn1BerDecodeBuffer.CalcIndefLen(), Asn1BerDecodeBuffer.DecodeOpenType(), and Asn1BerDecodeBuffer.Parse().
override System.String ToString | ( | ) |
This method will return a formatted string representing the tag value. The form is "[<class> <ID>]" (i.e. the ASN.1 standard syntax for a tag value).
References Asn1Type.ENUMERATED, Asn1Type.EOC, Asn1Type.SEQUENCE, and Asn1Type.SET.
Referenced by Asn1BerDecodeBuffer.DecodeTag(), and Asn1BerMessageDumpHandler.StartElement().
const short APPL = (short) (0x40) |
Mask value for an APPLICATION tag
const short Bit8Mask = (short) (0x80) |
Bit 8 (MSB) octet mask value
Referenced by Asn1BerDecodeBuffer.DecodeTag().
const short ClassMask = (short) (0xC0) |
Mask value to mask the class bits from a tag
Referenced by Asn1BerDecodeBuffer.DecodeTag().
const short CONS = (short) (0x20) |
Mask value for CONSTRUCTED form
Referenced by Asn1BerDecodeBuffer.DecodeEnumValue(), Asn1CerOutputStream.EncodeBitString(), Asn1CerOutputStream.EncodeBMPString(), Asn1CerOutputStream.EncodeCharString(), Asn1CerOutputStream.EncodeOctetString(), Asn1CerOutputStream.EncodeStringTag(), and Asn1CerOutputStream.EncodeUnivString().
const short CTXT = (short) (0x80) |
Mask value for a context-specific tag
|
static |
ASN.1 ENUMERATED type tag value
|
static |
ASN.1 end-of-contents (EOC) type tag value
Referenced by Asn1UTF8String.Asn1UTF8String(), Asn1BitString.Clear(), Asn1OctetString.CompareTo(), Asn1BMPString.Decode(), Asn1UniversalString.Decode(), and Asn1CharString.validate().
const bool EXPL = true |
This specifies that explicit tagging should be used.
Referenced by Asn1Type.Decode().
const short EXTIDCODE = (short) (0x1F) |
Mask value for extended tag identifier indicator
Referenced by Asn1BerDecodeBuffer.DecodeTag(), Asn1BerOutputStream.EncodeTag(), and Asn1BerEncodeBuffer.EncodeTag().
const short FormMask = (short) (0x20) |
Mask value to mask the form bit from a tag
Referenced by Asn1BerDecodeBuffer.DecodeTag().
const short IDMask = (short) (0x1F) |
Mask value to mask the tag ID bits from a tag
Referenced by Asn1BerDecodeBuffer.DecodeTag().
const bool IMPL = false |
This specifies that implicit tagging should be used.
const short L7BitsMask = (short) (0x7f) |
Lower 7 bits octet mask value
Referenced by Asn1BerDecodeBuffer.DecodeLength(), and Asn1BerDecodeBuffer.DecodeTag().
short mClass |
Tag class value (UNIV, APPL, CTXT, or PRIV)
Referenced by Asn1Type._SetLicLocation(), Asn1OerDecodeBuffer.DecodeTag(), Asn1BerDecodeBuffer.DecodeTag(), Asn1CerOutputStream.EncodeBitString(), Asn1CerOutputStream.EncodeBMPString(), Asn1CerOutputStream.EncodeCharString(), Asn1CerOutputStream.EncodeOctetString(), Asn1CerOutputStream.EncodeStringTag(), Asn1BerOutputStream.EncodeTag(), Asn1BerEncodeBuffer.EncodeTag(), Asn1CerOutputStream.EncodeUnivString(), Asn1Tag.Equals(), Asn1BerDecodeContext.MatchElemTag(), and Asn1BerDecodeBuffer.MatchTag().
short mForm |
Tag form value (PRIM or CONS)
Referenced by Asn1Type._SetLicLocation(), Asn1BerDecodeBuffer.DecodeEnumValue(), Asn1BerDecodeBuffer.DecodeTag(), Asn1BerOutputStream.EncodeTag(), Asn1BerEncodeBuffer.EncodeTag(), Asn1Tag.Equals(), Asn1BerDecodeContext.MatchElemTag(), and Asn1BerDecodeBuffer.MatchTag().
int mIDCode |
Tag ID code
Referenced by Asn1Type._SetLicLocation(), Asn1OerDecodeBuffer.DecodeTag(), Asn1BerDecodeBuffer.DecodeTag(), Asn1CerOutputStream.EncodeBitString(), Asn1CerOutputStream.EncodeBMPString(), Asn1CerOutputStream.EncodeCharString(), Asn1CerOutputStream.EncodeOctetString(), Asn1CerOutputStream.EncodeStringTag(), Asn1BerOutputStream.EncodeTag(), Asn1BerEncodeBuffer.EncodeTag(), Asn1CerOutputStream.EncodeUnivString(), Asn1Tag.Equals(), Asn1BerDecodeContext.MatchElemTag(), Asn1BerDecodeBuffer.MatchTag(), and Asn1CharString.validate().
const short PRIM = (short) (0x00) |
Mask value for PRIMITIVE form
Referenced by Asn1IA5String.Asn1IA5String(), Asn1Time.Asn1Time(), Asn1GeneralizedTime.CompareTo(), Asn1UTCTime.CompareTo(), Asn1BerDecodeBuffer.DecodeEnumValue(), Asn1RelativeOID.DecodeXML(), Asn1ObjectDescriptor.Encode(), Asn1GraphicString.Encode(), Asn1GeneralString.Encode(), Asn1VisibleString.Encode(), Asn1VideotexString.Encode(), Asn1T61String.Encode(), Asn1PrintableString.Encode(), Asn1NumericString.Encode(), Asn1Date.Encode(), Asn1Duration.Encode(), Asn1TimeOfDay.Encode(), Asn1DateTime.Encode(), Asn1X694OrderElement.Encode(), Asn1BMPString.Encode(), Asn1UTF8String.Encode(), Asn1Real10.Encode(), Asn1Integer.Encode(), Asn1UniversalString.Encode(), Asn1BitString.Encode(), Asn1OctetString.EncodeBase64Binary(), Asn1BerDecodeContext.Expired(), Asn1Real.NormalizedRealValueToString(), Asn1Null.ToString(), Asn1Enumerated.ToString(), Asn1Boolean.ToString(), and Asn1ObjectIdentifier.ToString().
const short PRIV = (short) (0xC0) |
Mask value for a PRIVATE tag
|
static |
ASN.1 SEQUENCE type tag value
|
static |
ASN.1 SET type tag value
const short UNIV = (short) (0x00) |
Mask value for a UNIVERSAL tag
Referenced by Asn1IA5String.Asn1IA5String(), Asn1Time.Asn1Time(), Asn1GeneralizedTime.CompareTo(), Asn1UTCTime.CompareTo(), Asn1BerDecodeBuffer.DecodeEnumValue(), Asn1RelativeOID.DecodeXML(), Asn1ObjectDescriptor.Encode(), Asn1GraphicString.Encode(), Asn1GeneralString.Encode(), Asn1VisibleString.Encode(), Asn1VideotexString.Encode(), Asn1T61String.Encode(), Asn1PrintableString.Encode(), Asn1NumericString.Encode(), Asn1Date.Encode(), Asn1Duration.Encode(), Asn1TimeOfDay.Encode(), Asn1DateTime.Encode(), Asn1X694OrderElement.Encode(), Asn1BMPString.Encode(), Asn1UTF8String.Encode(), Asn1Real10.Encode(), Asn1Integer.Encode(), Asn1UniversalString.Encode(), Asn1BitString.Encode(), Asn1OctetString.EncodeBase64Binary(), Asn1BerDecodeContext.Expired(), Asn1Real.NormalizedRealValueToString(), Asn1Null.ToString(), Asn1Enumerated.ToString(), Asn1Boolean.ToString(), and Asn1ObjectIdentifier.ToString().
|
get |
Gets the tag is constructed.
Value:
true
if tag is constructed; otherwise false
.
Referenced by Asn1BitString.Clear(), Asn1OctetString.CompareTo(), Asn1BMPString.Decode(), Asn1UniversalString.Decode(), Asn1BerDecodeBuffer.Parse(), Asn1BerMessageDumpHandler.StartElement(), and Asn1CharString.validate().