public uint GetUInt32() { if (ReadBytes + sizeof(uint) > WrittenBytes) throw new AegisException(AegisResult.BufferUnderflow, "No more readable buffer."); var val = BitConverter.ToUInt32(Buffer, ReadBytes); ReadBytes += sizeof(uint); return val; }