Companion

Functions

Link copied to clipboard
fun <P : Any> create(protectedHeader: CoseHeader, unprotectedHeader: CoseHeader? = null, payload: P?, signature: CryptoSignature.RawByteEncodable, payloadSerializer: KSerializer<P>): CoseSigned<P>

Use this method to create a new CoseSigned object with correct CoseSigned.wireFormat set.

Link copied to clipboard
fun <P : Any> deserialize(parameterSerializer: KSerializer<P>, it: ByteArray): KmmResult<CoseSigned<P>>
Link copied to clipboard
fun <P : Any> prepare(protectedHeader: CoseHeader, externalAad: ByteArray = byteArrayOf(), payload: P?, payloadSerializer: KSerializer<P>): CoseSignatureInput

Use this method to prepare a CoseSignatureInput object to calculate the signature, and then call create to create a CoseSigned object.