ConnectionIdentifier

An EDHOC connection identifier, C_I or C_R (RFC 9528 §3.3). Connection identifiers are byte strings; on the wire, a one-byte string that equals the one-byte CBOR encoding of an integer in -24..23 is sent as that integer, any other string as a CBOR byte string (RFC 9528 §3.3.2). With OSCORE the bytes become a Recipient ID unchanged (RFC 9528 §3.3.3).

ConnectionIdentifier(byteArrayOf(0x2d)).encode()   // 2d   (the integer -14)
ConnectionIdentifier(byteArrayOf(0x18)).encode() // 41 18

Constructors

Link copied to clipboard
constructor(bytes: ByteArray)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The identifier itself, which is also the OSCORE Recipient ID it maps to.

Link copied to clipboard
val size: Int

Length of the identifier in bytes.

Functions

Link copied to clipboard

The representation in EDHOC messages (RFC 9528 §3.3.2).

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