CborMap

data class CborMap(val entries: List<Pair<CborValue, CborValue>>) : CborValue(source)

Major type 5. Entries keep the order they were given or decoded in, because COSE and EDHOC structures are compared byte for byte. Use sortedDeterministically for RFC 8949 §4.2.1 key order.

Constructors

Link copied to clipboard
constructor(entries: List<Pair<CborValue, CborValue>>)
constructor(vararg entries: Pair<CborValue, CborValue>)

Properties

Link copied to clipboard
Link copied to clipboard
val size: Int

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The value as a Long, or an exception naming what was found instead.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The preferred (deterministic) encoding of this value. Map entries keep their order.

Link copied to clipboard
operator fun get(key: CborValue): CborValue?
operator fun get(label: Int): CborValue?
operator fun get(key: String): CborValue?

operator fun get(label: Long): CborValue?

Lookup by integer label, the common case for COSE.

Link copied to clipboard

Keys sorted by the bytewise order of their encodings (RFC 8949 §4.2.1).

Link copied to clipboard
open override fun toString(): String