private FPData CommonPeekHead(byte[] bytes)
        {
            if (bytes.Length == 12)
            {
                FPData data = this._pkg.PeekHead(bytes);

                if (!this.CheckHead(data))
                {
                    return(null);
                }

                if (this._pkg.IsOneWay(data))
                {
                    data.SetPkgLen(12 + data.GetSS() + data.GetPsize());
                }

                if (this._pkg.IsTwoWay(data))
                {
                    data.SetPkgLen(16 + data.GetSS() + data.GetPsize());
                }

                if (this._pkg.IsAnswer(data))
                {
                    data.SetPkgLen(16 + data.GetPsize());
                }

                data.Bytes = this._pkg.GetByteArrayRange(bytes, 0, bytes.Length - 1);
                return(data);
            }

            return(null);
        }
        private FPData CryptoPeekHead(byte[] bytes)
        {
            if (bytes != null && bytes.Length >= 4)
            {
                FPData data = new FPData();
                data.SetPkgLen((int)BitConverter.ToUInt32(this._pkg.GetByteArrayRange(bytes, 0, 3), 0));
                data.Bytes = this._pkg.GetByteArrayRange(bytes, 4, bytes.Length - 1);

                if (data.GetPkgLen() > 8 * 1024 * 1024)
                {
                    return(null);
                }

                return(data);
            }

            return(null);
        }