示例#1
0
        private APDUParam BuildParam(string P1, string P2, string Le)
        {
            byte bP1 = byte.Parse(P1, NumberStyles.AllowHexSpecifier);
            byte bP2 = byte.Parse(P2, NumberStyles.AllowHexSpecifier);
            byte bLe = byte.Parse(Le);

            APDUParam apduParam = new APDUParam();

            apduParam.P1 = bP1;
            apduParam.P2 = bP2;
            apduParam.Le = bLe;

            // Update Current param
            m_apduParam = apduParam.Clone();

            return(apduParam);
        }
示例#2
0
        private APDUParam BuildAPDUParameters()
        {
            byte bP1 = byte.Parse(textP1.Text, NumberStyles.AllowHexSpecifier);
            byte bP2 = byte.Parse(textP2.Text, NumberStyles.AllowHexSpecifier);
            byte bLe = byte.Parse(textLe.Text);

            APDUParam apduParam = new APDUParam();

            apduParam.P1 = bP1;
            apduParam.P2 = bP2;
            apduParam.Le = bLe;

            byte[] data = ByteArray.Parse(textData.Text);
            if (data.Length > 0)
            {
                apduParam.Data = data;
            }

            // Update Current param
            apduParam = apduParam.Clone();

            return(apduParam);
        }