示例#1
0
            // node returns a node containing the chunkState's current state, with the
            // ChunkEnd flag set.
            public unsafe Blake3Node Node()
            {
                var result = _n.Clone();

                fixed(byte *blockPtr = _block)
                {
                    fixed(uint *resultPtr = result.Block)
                    {
                        // pad the remaining space in the block with zeros
                        PointerUtils.MemSet(blockPtr + _blockLen, 0, _block.Length - _blockLen);
                        Converters.le32_copy(blockPtr, 0, resultPtr, 0, BlockSizeInBytes);
                    }
                }

                result.BlockLen = (uint)_blockLen;
                result.Flags   |= flagChunkEnd;

                return(result);
            }