Exemple #1
0
            } // end function Update

            public static Blake3ChunkState DefaultBlake3ChunkState()
            {
                Blake3ChunkState result = new Blake3ChunkState();

                result.N             = Blake3Node.DefaultBlake3Node();
                result.Block         = new byte[BlockSizeInBytes];
                result.BlockLen      = 0;
                result.BytesConsumed = 0;

                return(result);
            } // end function DefaultBlake3ChunkState
Exemple #2
0
            public Blake3ChunkState Clone()
            {
                Blake3ChunkState result = DefaultBlake3ChunkState();

                result.N             = N.Clone();
                result.Block         = Block.DeepCopy();
                result.BlockLen      = BlockLen;
                result.BytesConsumed = BytesConsumed;

                return(result);
            } // end function Clone
Exemple #3
0
            } // end function DefaultBlake3ChunkState

            public static Blake3ChunkState CreateBlake3ChunkState(UInt32[] a_IV, UInt64 a_ChunkCounter, UInt32 a_Flags)
            {
                Blake3ChunkState result = DefaultBlake3ChunkState();

                result.N.CV       = a_IV.DeepCopy();
                result.N.Counter  = a_ChunkCounter;
                result.N.BlockLen = BlockSizeInBytes;
                // compress the first block with the start flag set
                result.N.Flags = a_Flags | flagChunkStart;

                return(result);
            } // end function CreateBlake3ChunkState