Asn1Type type

class pyasn1.type.base.Asn1Type(tagSet=TagSet(), subtypeSpec=ConstraintsIntersection())

Base class for all classes representing ASN.1 types.

In the user code, Asn1Type class is normally used only for telling ASN.1 objects from others.

Note

For as long as ASN.1 is concerned, a way to compare ASN.1 types is to use isSameTypeWith() and isSuperTypeOf() methods.

tagSet = <TagSet object, untagged>

Set or return a TagSet object representing ASN.1 tag(s) associated with Asn1Type type.

subtypeSpec = <ConstraintsIntersection object>

Default ConstraintsIntersection object imposing constraints on initialization values.

property effectiveTagSet

For Asn1Type type is equivalent to tagSet

property tagMap

Return a TagMap object mapping ASN.1 tags to ASN.1 objects within callee object.

isSameTypeWith(other, matchTags=True, matchConstraints=True)

Examine Asn1Type type for equality with other ASN.1 type.

ASN.1 tags (tag) and constraints (constraint) are examined when carrying out ASN.1 types comparison.

Python class inheritance relationship is NOT considered.

Parameters

other (a pyasn1 type object) – Class instance representing ASN.1 type.

Returns

boolTrue if other is Asn1Type type, False otherwise.

isSuperTypeOf(other, matchTags=True, matchConstraints=True)

Examine Asn1Type type for subtype relationship with other ASN.1 type.

ASN.1 tags (tag) and constraints (constraint) are examined when carrying out ASN.1 types comparison.

Python class inheritance relationship is NOT considered.

Parameters

other (a pyasn1 type object) – Class instance representing ASN.1 type.

Returns

boolTrue if other is a subtype of Asn1Type type, False otherwise.