CoseSigned
Representation of a signed COSE_Sign1 object, i.e. consisting of protected header, unprotected header and payload.
If the payload is a generic ByteArray, then it will be serialized as-is. Should the payload be any other type, we will tag it with 24 (see RFC8949 3.4.5.1) for serialization. In order to prevent nested wrapping of the payload and the resulting type erasure payloads of type ByteStringWrapper will be rejected. In this case the payload could be handed over as the wrapped class itself or manually serialized to ByteArray
See RFC 9052.