Esempio n. 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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public long Load(byte[] buffer, long offset)
 {
     return(BufferTools.ReadNumberFromBuffer(buffer, offset, 1, out value));
 }