coseMac0
fun coseMac0(algorithm: Algorithm, key: ByteArray, message: ByteArray, includeMessageInPayload: Boolean, protectedHeaders: Map<CoseLabel, DataItem>, unprotectedHeaders: Map<CoseLabel, DataItem>): CoseMac0
Creates a COSE_Mac0 message authentication code.
By default, no headers are added. Applications likely want to include Cose.COSE_LABEL_ALG in the protected header.
Parameters
algorithm
the algorithm to use, e.g. Algorithm.HMAC_SHA256.
key
the bytes of the symmetric key to use.
message
the message.
includeMessageInPayload
whether to include the message in the payload.
protectedHeaders
the protected headers to include.
unprotectedHeaders
the unprotected headers to include.