CoseSigned

@Serializable(with = CoseSignedSerializer::class)
data class CoseSigned<P>(source)

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.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val payload: P?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

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
fun prepareCoseSignatureInput(externalAad: ByteArray = byteArrayOf()): ByteArray
Link copied to clipboard
fun serialize(parameterSerializer: KSerializer<P>): ByteArray
Link copied to clipboard
open override fun toString(): String