Exemple #1
0
        protected virtual bool CalcMacByTrakeySign(byte[] macBytes, byte[] MAC)
        {
            bool ret = false;

            ret = CalcMac_CBC_X99(this, macBytes, KeyManager.GetEnTraKey(mSectionName), KeyManager.GetDeTraKey(mSectionName), AlgorithmType.X99, MAC);
            return(ret);
        }
Exemple #2
0
        protected virtual bool CalcMacByTrakey(byte[] macBytes, byte[] MAC)
        {
            bool ret = false;

            switch (AlType)
            {
            case AlgorithmType.ECB:
                ret = CalcMac_ECB(this, macBytes, KeyManager.GetEnTraKey(mSectionName), KeyManager.GetDeTraKey(mSectionName), MAC);
                break;

            case AlgorithmType.CBC:
            case AlgorithmType.X99:
                ret = CalcMac_CBC_X99(this, macBytes, KeyManager.GetEnTraKey(mSectionName), KeyManager.GetDeTraKey(mSectionName), AlType, MAC);
                break;
            }
            return(ret);
        }