def finalize(self, block):
        t1 = self.mac_aes.encrypt(block)
        t2 = _xor_block(self.mac, t1)
        self.mac = t2
The final step of CBC-MAC encrypts before xor.
dataset/ETHPy150Open Yubico/python-pyhsm/pyhsm/soft_hsm.py/_cbc_mac.finalize