Esempio n. 1
0
        /// <summary>
        /// Initalises a new extension from the received data
        /// </summary>
        /// <param name="data">byte array of data to parse</param>
        /// <returns>new UserDefined Extension</returns>
        internal override ExtensionBase Create(SlpReader reader)
        {
            var result = new UnknownExtension();
            result._Id = reader.ReadInt16();
            result.Offset = reader.ReadInt24();
            result.Data = reader.ReadBytes(result.Offset);

            return result;
        }
Esempio n. 2
0
        /// <summary>
        /// Initalises a new extension from the received data
        /// </summary>
        /// <param name="data">byte array of data to parse</param>
        /// <returns>new UserDefined Extension</returns>
        internal override ExtensionBase Create(SlpReader reader)
        {
            var result = new UnknownExtension();

            result._Id    = reader.ReadInt16();
            result.Offset = reader.ReadInt24();
            result.Data   = reader.ReadBytes(result.Offset);

            return(result);
        }
Esempio n. 3
0
        public virtual Security.AuthenticationBlock CreateAuthenticationBlock(SlpReader reader)
        {
            var result = new Security.AuthenticationBlock();
            result.Descriptor = reader.ReadInt16();
            var length = reader.ReadInt16();
            result.TimeStamp = reader.ReadDateTime();
            result.SpiString = reader.ReadString();

            result.Data = reader.ReadBytes(length);

            return result;
        }
Esempio n. 4
0
        public virtual Security.AuthenticationBlock CreateAuthenticationBlock(SlpReader reader)
        {
            var result = new Security.AuthenticationBlock();

            result.Descriptor = reader.ReadInt16();
            var length = reader.ReadInt16();

            result.TimeStamp = reader.ReadDateTime();
            result.SpiString = reader.ReadString();

            result.Data = reader.ReadBytes(length);

            return(result);
        }