ObjectIdentifier

ASN.1 OBJECT IDENTIFIER featuring the most cursed encoding of numbers known to man, which probably surfaced due to an ungodly combination of madness, cruelty and a twisted sense of humour. Courtesy of what were most probably tormented souls to begin with.

Parameters

nodes

OID Tree nodes passed in order (e.g. 1u, 2u, 96u, …)

Throws

if less than two nodes are supplied, the first node is >2 or the second node is >39

Constructors

Link copied to clipboard
constructor(uuid: Uuid)

Creates an OID in the 2.25 subtree that requires no formal registration. E.g. the UUID 550e8400-e29b-41d4-a716-446655440000 results in the OID 2.25.113059749145936325402354257176981405696

constructor(vararg nodes: UInt)
constructor(oid: String)

Types

Link copied to clipboard

Properties

Link copied to clipboard

Efficient, but cursed encoding of OID nodes, see Microsoft's KB entry on OIDs for details. Lazily evaluated.

Link copied to clipboard

Lazily evaluated list of OID nodes (e.g. [1, 2, 35, 4654])

Functions

Link copied to clipboard

Convenience function to directly get the DER-encoded representation of the implementing object

Link copied to clipboard

Exception-free version of encodeToDer

Link copied to clipboard
open fun encodeToDerSafe(): KmmResult<ByteArray>

Safe version of encodeToDer, wrapping the result into a KmmResult

Link copied to clipboard
open override fun encodeToTlv(): Asn1Primitive
Link copied to clipboard

Exception-free version of encodeToTlv

Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Primitive>

Safe version of encodeToTlv, wrapping the result into a KmmResult

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Creates a new implicitly tagged ASN.1 Element from this ASN.1 Element. NOTE: The TagClass of the provided tag will be used! If you want the result to have TagClass.CONTEXT_SPECIFIC, also invoke tag withClass TagClass.CONTEXT_SPECIFIC!. If a CONSTRUCTED Tag is applied to an ASN.1 Primitive, the CONSTRUCTED bit is overridden and set to zero

Creates a new implicitly tagged ASN.1 Element from this ASN.1 Structure. If the provided template's tagClass is not set, the class of the resulting structure defaults to TagClass.CONTEXT_SPECIFIC. If a CONSTRUCTED Tag is applied to an ASN.1 Primitive, the CONSTRUCTED bit is overridden and set to zero

open infix fun withImplicitTag(tagValue: ULong): Asn1Element

Creates a new implicitly tagged ASN.1 Element from this ASN.1 Element. Sets the class of the resulting structure to TagClass.CONTEXT_SPECIFIC