PsaMacCompute
Calculate the MAC of a message. Opcode: 22 (0x0016
)
Parameters
Name | Type | Description |
---|---|---|
key_name | String | Name of the key to use for the operation |
alg | Mac | Mac algorithm to compute |
input | Vector of bytes | Buffer containing the input message |
key_name
must allow the usage flagsign_message
.
Results
Name | Type | Description |
---|---|---|
mac | Vector of bytes | Buffer containing the MAC |
Specific response status codes
PsaErrorNotPermitted
: The key does not have thesign_message
flag, or it does not permit the requested algorithm.
Description
This function will calculate the message authentication code (MAC) of a message.
Contract
Copyright 2020 Contributors to the Parsec project.