✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
No código que se apresenta abaixo, falta uma linha (assinalada com um comentário). Qual seria a linha em falta, para poder calcular o CMAC da mensagem?
import osfrom cryptography.hazmat.primitives import cmacfrom cryptography.hazmat.primitives.ciphers import algorithmsmessage =
"This my message to compute the MAC"# Linha em FALTAc = cmac.CMAC(algorithms.AES(key))
c.update(message.encode('ascii'))mac = c.finalize()print(mac.hex())