예제 #1
0
        public long Load(byte[] buffer, long offset)
        {
            long length;
            var  new_offset = BufferTools.ReadNumberFromBuffer(buffer, offset, 2, out length);

            this.buffer = new byte[length];
            Array.Copy(buffer, new_offset, this.buffer, 0, length);
            return(offset + 2 + length);
        }
예제 #2
0
파일: TLS.cs 프로젝트: johanjordaan/tls-gen
        public int Load(byte[] buffer, long offset)
        {
            long value;

            BufferTools.ReadNumberFromBuffer(buffer, offset, num_bytes, out value);
            if (Enum.IsDefined(typeof(CipherTypeEnum), value))
            {
                this.value = (CipherTypeEnum)value;
            }
            return(num_bytes);
        }
예제 #3
0
 public long Load(byte[] buffer, long offset)
 {
     return(BufferTools.ReadNumberFromBuffer(buffer, offset, 1, out value));
 }