type

AsnObj

src const class AsnObj : Obj

A tagged ASN.1 value

constructors

fields

tags

The tags for this object.

val

The value for this object.

methods

bigInt

Get the value as a BigInt.

bool

Get the value as a Bool

buf

Get any of the binary values as a Buf.

coll

Get this object as an AsnColl

effectiveTags

Apply rules for EXPLICIT and IMPLICIT tags to obtain the set of effective tags for encoding this object.

equals
hash
int

Get the value as an Int.

isBool

Is this object's universal tag a Boolean

isInt

Is this object's universal tag an Integer

isNull

Is this an ASN.1 Null value

isOcts

Is this object's universal tag an Octet String

isOid

Is this object's universal tag an Object Identifier

isPrimitive

Is this a primitive type?

oid

Get this object as an AsnOid

push

Push a tag to the front of the tag chain for this value.

seq

Get this object as an AsnSeq

str

Get the value as a Str

tag

Get the single effective tag for this object.

toStr
ts

Get the value as a DateTime timestamp

univTag

Get the univ tag for this object

valEquals
valHash
valStr

Slot Details

bigInt

src BigInt bigInt()

Get the value as a BigInt.

bool

src Bool bool()

Get the value as a Bool

buf

src virtual Buf buf()

Get any of the binary values as a Buf. The Buf will be a safe copy that can be modified. Throws AsnErr if the value is not a binary value.

coll

src AsnColl coll()

Get this object as an AsnColl

effectiveTags

src AsnTag[] effectiveTags()

Apply rules for EXPLICIT and IMPLICIT tags to obtain the set of effective tags for encoding this object.

equals

src override Bool equals(Obj? obj)

hash

src override Int hash()

int

src Int int()

Get the value as an Int. If the value is a BigInt you may lose both precision and sign. Use bigInt to get the value explicitly as a BigInt.

isBool

src Bool isBool()

Is this object's universal tag a Boolean

isInt

src Bool isInt()

Is this object's universal tag an Integer

isNull

src Bool isNull()

Is this an ASN.1 Null value

isOcts

src Bool isOcts()

Is this object's universal tag an Octet String

isOid

src Bool isOid()

Is this object's universal tag an Object Identifier

isPrimitive

src Bool isPrimitive()

Is this a primitive type?

make

src new make(AsnTag[] tags, Obj? val)

oid

src AsnOid oid()

Get this object as an AsnOid

push

src virtual AsnObj push(AsnTag tag)

Push a tag to the front of the tag chain for this value. Returns a new instance of this object with the current value.

AsnObj.int(123).tag(AsnTag.implicit(TagClass.context, 0))
  => [0] IMPLICIT [UNIVERSAL 2]
AsnObj.int(123).tag(AsnTag.explicit(TagClass.app, 1))
  => [APPLICATION 1] EXPLICIT [UNIVERSAL 2]

seq

src AsnSeq seq()

Get this object as an AsnSeq

str

src Str str()

Get the value as a Str

tag

src AsnTag tag()

Get the single effective tag for this object. Throws an error if there are multiple effective tags

tags

src const AsnTag[] tags

The tags for this object.

toStr

src virtual override Str toStr()

ts

src DateTime ts()

Get the value as a DateTime timestamp

univTag

src AsnTag univTag()

Get the univ tag for this object

val

src const Obj? val

The value for this object.

valEquals

src protected virtual Bool valEquals(AsnObj that)

valHash

src protected virtual Int valHash()

valStr

src protected virtual Str valStr()