toCoseX5t

suspend fun toCoseX5t(): DataItem

Encodes the leaf signing certificate's SHA-256 hash as a CBOR COSE_CertHash structure for use in the COSE x5t header parameter (label 34) according to RFC 9360 Section 2.

Return

a DataItem encoding [ -16, sha256(certificates.first().encoded) ].