Asn1Tag Struct

Definition

This type represents an ASN.1 tag, as described in ITU-T Recommendation X.680.

public value class Asn1Tag : IEquatable<System::Formats::Asn1::Asn1Tag>
public readonly struct Asn1Tag : IEquatable<System.Formats.Asn1.Asn1Tag>
type Asn1Tag = struct
Public Structure Asn1Tag
Implements IEquatable(Of Asn1Tag)
Inheritance
Asn1Tag
Implements

Constructors

Asn1Tag(TagClass, Int32, Boolean)

Create an Asn1Tag for a specified value within a specified tag class.

Asn1Tag(UniversalTagNumber, Boolean)

Create an Asn1Tag for a tag from the UNIVERSAL class.

Fields

Boolean

Represents the universal class tag for a Boolean value.

ConstructedBitString

Represents the universal class tag for a Bit String value under a constructed encoding.

ConstructedOctetString

Represents the universal class tag for a Octet String value under a constructed encoding.

Enumerated

Represents the universal class tag for an Enumerated value.

GeneralizedTime

Represents the universal class tag for a GeneralizedTime value.

Integer

Represents the universal class tag for an Integer value.

Null

Represents the universal class tag for a null value.

ObjectIdentifier

Represents the universal class tag for an Object Identifier value.

PrimitiveBitString

Represents the universal class tag for a Bit String value under a primitive encoding.

PrimitiveOctetString

Represents the universal class tag for an Octet String value under a primitive encoding.

Sequence

Represents the universal class tag for a Sequence value (always a constructed encoding).

SetOf

Represents the universal class tag for a SetOf value (always a constructed encoding).

UtcTime

Represents the universal class tag for a UtcTime value.

Properties

IsConstructed

Indicates if the tag represents a constructed encoding (true), or a primitive encoding (false).

TagClass

The tag class to which this tag belongs.

TagValue

The numeric value for this tag.

Methods

AsConstructed()

Produces a tag with the same TagClass and TagValue values, but whose IsConstructed is true.

AsPrimitive()

Produces a tag with the same TagClass and TagValue values, but whose IsConstructed is false.

CalculateEncodedSize()

Reports the number of bytes required for the BER-encoding of this tag.

Decode(ReadOnlySpan<Byte>, Int32)

Reads a BER-encoded tag which starts at source.

Encode(Span<Byte>)

Writes the BER-encoded form of this tag to destination.

Equals(Asn1Tag)

Tests if other has the same encoding as this tag.

Equals(Object)

Tests if obj is an Asn1Tag with the same encoding as this tag.

GetHashCode()

Returns the hash code for this instance.

HasSameClassAndValue(Asn1Tag)

Tests if other has the same TagClass and TagValue values as this tag, and does not compare IsConstructed.

ToString()

Provides a text representation of this tag suitable for debugging.

TryDecode(ReadOnlySpan<Byte>, Asn1Tag, Int32)

Attempts to read a BER-encoded tag which starts at source.

TryEncode(Span<Byte>, Int32)

Attempts to write the BER-encoded form of this tag to destination.

Operators

Equality(Asn1Tag, Asn1Tag)

Tests if two Asn1Tag values have the same BER encoding.

Inequality(Asn1Tag, Asn1Tag)

Tests if two Asn1Tag values have a different BER encoding.

Applies to