/// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);

            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _dataLength = Convert.ToInt32(KeyValues.Item("Length"), 16);

            try
            {
                if (message.CharsLeft < _dataLength)
                {
                    XmlParseResult = ErrorCodes.ER_80_DATA_LENGTH_ERROR;
                }
                else if (message.CharsLeft > _dataLength)
                {
                    XmlParseResult = ErrorCodes.ER_15_INVALID_INPUT_DATA;
                }
                else
                {
                    _data = message.Substring(_dataLength);
                }
            }
            catch (Exception)
            {
                XmlParseResult = ErrorCodes.ER_80_DATA_LENGTH_ERROR;
            }
        }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);

            if (XmlParseResult == ErrorCodes.ER_00_NO_ERROR)
            {
                _delay = KeyValues.Item("Delay");
            }
        }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);
            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _cryptPin = KeyValues.Item("PIN");
            _acctNbr  = KeyValues.Item("Account Number");
        }
示例#4
0
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);
            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _keyType   = KeyValues.Item("Key Type");
            _keyScheme = KeyValues.Item("Key Scheme LMK");
        }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);
            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _targetKey = KeyValues.ItemCombination("ZPK Scheme", "ZPK");
            _pbFormat  = KeyValues.Item("PIN Block Format Code");
            _acct      = KeyValues.Item("Account Number");
            _pin       = KeyValues.Item("PIN");
        }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);

            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _keyType   = KeyValues.Item("Key Type");
            _zmk       = KeyValues.ItemCombination("ZMK Scheme", "ZMK");
            _key       = KeyValues.ItemCombination("Key Scheme", "Key");
            _zmkScheme = KeyValues.Item("Key Scheme ZMK");
        }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);
            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _keyA          = KeyValues.Item("ZMK Component #1");
            _keyB          = KeyValues.Item("ZMK Component #2");
            _keyC          = KeyValues.Item("ZMK Component #3");
            _keySchemeLmk  = KeyValues.ItemOptional("Key Scheme LMK");
            _keyCheckValue = KeyValues.ItemOptional("Key Check Value Type");
        }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);
            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _modeFlag  = KeyValues.Item("Mode");
            _keyType   = KeyValues.Item("Key Type");
            _keyScheme = KeyValues.Item("Key Scheme LMK");
            _zmkScheme = KeyValues.ItemOptional("Key Scheme ZMK");
            _zmk       = KeyValues.ItemOptional("ZMK Scheme") + KeyValues.ItemOptional("ZMK");
        }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);
            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _pvkPair     = KeyValues.ItemCombination("PVK Scheme", "PVK");
            _offsetValue = KeyValues.Item("Offset");
            _checkLen    = KeyValues.Item("Check Length");
            _acct        = KeyValues.Item("Account Number");
            _decTable    = KeyValues.Item("Decimalisation Table");
            _pinValData  = KeyValues.Item("PIN Validation Data");
        }
示例#10
0
 /// <summary>
 /// Accept message from client.
 /// </summary>
 /// <param name="message">Request message.</param>
 public override void AcceptMessage(StreamMessage message)
 {
     base.AcceptMessage(message);
     if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
     {
         return;
     }
     _nbrComponents  = KeyValues.Item("Number of Components");
     _iNbrComponents = Convert.ToInt32(_nbrComponents);
     for (var i = 1; i <= _iNbrComponents; i++)
     {
         _comps[i - 1] = KeyValues.ItemCombination("ZMK Component Scheme #" + i.ToString(),
                                                   "ZMK Component #" + i.ToString());
     }
     _lmkScheme     = KeyValues.ItemOptional("Key Scheme LMK");
     _keyCheckValue = KeyValues.ItemOptional("Key Check Value Type");
 }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);
            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _clearPin = KeyValues.Item("PIN");
            _acctNbr  = KeyValues.Item("Account Number");

            if (_clearPin.IndexOf("F", System.StringComparison.Ordinal) > 0)
            {
                var newPin = _clearPin.Replace("F", "");
                _clearPin = newPin.PadLeft(_clearPin.Length, '0');
            }
        }
        /// <summary>
        /// Accept message from client.
        /// </summary>
        /// <param name="message">Request message.</param>
        public override void AcceptMessage(StreamMessage message)
        {
            base.AcceptMessage(message);
            if (XmlParseResult != ErrorCodes.ER_00_NO_ERROR)
            {
                return;
            }

            _blockNumber = KeyValues.Item("Message Block");
            _keyType     = KeyValues.Item("Key Type");
            _keyLength   = KeyValues.Item("Key Length");
            _messageType = KeyValues.Item("Message Type");
            _key         = KeyValues.ItemCombination("Key Scheme", "Key");
            _iv          = KeyValues.ItemOptional("IV");
            _msgLength   = KeyValues.Item("Message Length");
            _strMsg      = KeyValues.Item("Message");
        }