Hi @undefined
Hope you are doing great, and happy holidays
in this case the issue as was in your code you are doing an HMAC so basically you use a hash as you are doing like SHA so this is different than a CMAC as you correctly state in your last update CMAC uses as base the AES algorithm .
BR
Jonathan