logo

Crowdly

Browser

Add to Chrome

No código que se apresenta abaixo, falta uma linha (assinalada com um comentário...

✅ 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 os

from cryptography.hazmat.primitives import cmac

from cryptography.hazmat.primitives.ciphers import algorithms

message =

"This my message to compute the MAC"

# Linha em FALTA

c = cmac.CMAC(algorithms.AES(key))

c.update(message.encode('ascii'))

mac = c.finalize()

print(mac.hex())
More questions like this

Want instant access to all verified answers on moodle24.iscte-iul.pt?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome