Example #1
0
        public MessageBufferHG(MessageBufferHG right)
        {
            _wpos     = right._wpos;
            _rpos     = right._rpos;
            _size     = right._size;
            _capacity = BitOperations.RoundUpToPowerOf2((uint)_size);

            _storage = NativeMemory.Alloc(_capacity);

            Buffer.MemoryCopy(right._storage, _storage, (ulong)_size, (ulong)_size);
        }
Example #2
0
 public SHA1Hash()
 {
     _dataBuffer = new();
     _digest     = NativeMemory.Alloc((uint)SHA1_DIGEST_LENGTH);
 }