decodeToEnumOrdinal
fun Asn1Primitive.decodeToEnumOrdinal(assertTag: Asn1Element.Tag = Asn1Element.Tag.ENUM, lenient: Boolean = false): Long(source)
decodes this Asn1Primitive's content into an enum ordinal represented as Long. assertTag defaults to Asn1Element.Tag.ENUM, but can be overridden (for implicitly tagged enums, for example)
Parameters
lenient
Relaxes DER constraints, which are:
The content of the
INTEGERtype is not empty.The
INTEGERvalue is minimally encoded, verifying that:Positive ints do not contain leading zero bytes unless necessary.
Negative ints do not use excessive sign extension bytes.
Throws
on invalid input