JwsGeneral

@Serializable
data class JwsGeneral : JWS(source)

General JSON JWS.

A general JWS carries one payload and one or more SignatureElements. Each SignatureElement contains the header fragments for one signature and exposes its merged effective JwsHeader. All signatures in a JwsGeneral share the same payload.

plainPayload stores the plain payload bytes. JSON serialization base64url-encodes those bytes for the payload member, so callers should not pre-encode them.

If plainPayload data structure is defined as part of the contact consider JwsGeneralTyped

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@Transient
val jwsHeaders: List<JwsHeader>
Link copied to clipboard
@SerialName(value = "payload")
open override val plainPayload: ByteArray

Raw payload bytes.

Link copied to clipboard
@Serializable
@SerialName(value = "signatures")
val signatureElements: List<SignatureElement>
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns a new JwsGeneral with one additional signature over the same payload.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
inline fun <P> getPayload(serialFormat: SerialFormat = joseCompliantSerializer): KmmResult<P>

Find correct serializer at compile time

fun <P> getPayload(serializer: KSerializer<P>, serialFormat: SerialFormat = joseCompliantSerializer): KmmResult<P>
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Expands general JSON JWS representation into one flattened JWS per signature.