PsaMacCompute

Calculate the MAC of a message. Opcode: 22 (0x0016)

Parameters

NameTypeDescription
key_nameStringName of the key to use for the operation
algMacMac algorithm to compute
inputVector of bytesBuffer containing the input message
  • key_name must allow the usage flag sign_message.

Results

NameTypeDescription
macVector of bytesBuffer containing the MAC

Specific response status codes

  • PsaErrorNotPermitted: The key does not have the sign_message flag, or it does not permit the requested algorithm.

Description

This function will calculate the message authentication code (MAC) of a message.

Contract

Protobuf

Copyright 2020 Contributors to the Parsec project.