AsnObj
const class AsnObj : Obj
A tagged ASN.1 value
The value for this object
The tags for this object
Get this object as an AsnColl
Get the value as a Bool
Get this object as an AsnOid
Is this object's universal tag a Boolean
Is this object's universal tag an Integer
Get the univ tag for this object
Get the single effective tag for this object
Get this object as an AsnSeq
Get the value as an Int
Push a tag to the front of the tag chain for this value
Get the value as a Str
Get any of the binary values as a Buf
Apply rules for EXPLICIT and IMPLICIT tags to obtain the set of effective tags for encoding this object
Is this an ASN.1 Null value
Is this object's universal tag an Octet String
Get the value as a BigInt
Is this object's universal tag an Object Identifier
Is this a primitive type?
Get the value as a DateTime timestamp
BigInt bigInt()
Get the value as a BigInt.
Bool bool()
Get the value as a Bool
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.
AsnColl coll()
Get this object as an AsnColl
AsnTag[] effectiveTags()
Apply rules for EXPLICIT and IMPLICIT tags to obtain the set of effective tags for encoding this object.
Bool equals(Obj? obj)
Int hash()
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.
Bool isBool()
Is this object's universal tag a Boolean
Bool isInt()
Is this object's universal tag an Integer
Bool isNull()
Is this an ASN.1 Null value
Bool isOcts()
Is this object's universal tag an Octet String
Bool isOid()
Is this object's universal tag an Object Identifier
Bool isPrimitive()
Is this a primitive type?
new make(AsnTag[] tags, Obj? val)
AsnOid oid()
Get this object as an AsnOid
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]
AsnSeq seq()
Get this object as an AsnSeq
Str str()
Get the value as a Str
AsnTag tag()
Get the single effective tag for this object. Throws an error if there are multiple effective tags
const AsnTag[] : tags
The tags for this object.
virtual Str toStr()
DateTime ts()
Get the value as a DateTime timestamp
AsnTag univTag()
Get the univ tag for this object
const Obj? : val
The value for this object.
virtual Bool valEquals(AsnObj that)
virtual Int valHash()
virtual Str valStr()