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 18Content copied to clipboard