예제 #1
0
        public static byte Replace(string bte)
        {
            if (tableLSingleton == null)
            {
                TableL.tableLSingleton = new TableL();
            }
            var byteStr = bte.ToCharArray();

            return(TableL.tableLSingleton.tableL[Convert.ToInt32(byteStr[0].ToString(), 16), Convert.ToInt32(byteStr[1].ToString(), 16)]);
        }
예제 #2
0
        private int nvl(int val1, int val2, int i, int j, int roundKey, int vt)
        {
            var val1Result = (ValidateWidthValue(TableL.Replace(val1.ToString("X2")) + TableL.Replace(val2.ToString("X2")))).ToString("X2");

            if (val1.Equals(0) || val2.Equals(0))
            {
                return(0);
            }
            if (val1.Equals(1))
            {
                return(val2);
            }
            if (val2.Equals(1))
            {
                return(val1);
            }
            var vr = TableE.Replace(ValidateWidthValue(TableL.Replace(val1.ToString("X2")) + TableL.Replace(val2.ToString("X2"))).ToString("X2"));

            return(vr);
        }