private byte[] GenerateCmac(CommandApdu apdu)
        {
            byte[] icv = this.CMac.All(x => x == 0x00) ? this.CMac : DES.Encrypt(this.CMac, this.CMacKey.Take(8).ToArray());

            var data = GetDataForCmac(apdu);

            byte[] mac = MAC.Algorithm3(data, this.CMacKey, icv);

            return(this.CMac = mac);
        }