@@ -119,8 +119,8 @@ public void Update(ReadOnlySpan<byte> source)
119119 return ;
120120 }
121121
122- source . Slice ( 0 , remain ) . CopyTo ( _buffer . AsSpan ( _bufferIndex ) ) ;
123- source = source . Slice ( remain ) ;
122+ source [ .. remain ] . CopyTo ( _buffer . AsSpan ( _bufferIndex ) ) ;
123+ source = source [ remain .. ] ;
124124 _w [ _index ++ ] = BinaryPrimitives . ReadUInt32BigEndian ( _buffer ) ;
125125 _bufferIndex = 0 ;
126126 }
@@ -134,7 +134,7 @@ public void Update(ReadOnlySpan<byte> source)
134134 }
135135
136136 _w [ _index ++ ] = BinaryPrimitives . ReadUInt32BigEndian ( source ) ;
137- source = source . Slice ( SizeOfInt ) ;
137+ source = source [ SizeOfInt .. ] ;
138138 }
139139 if ( _index == BlockSizeOfInt )
140140 {
@@ -195,13 +195,13 @@ public unsafe void GetHash(Span<byte> destination)
195195 else
196196 {
197197 BinaryPrimitives . WriteUInt32BigEndian ( destination , V . GetElement ( 0 ) ) ;
198- BinaryPrimitives . WriteUInt32BigEndian ( destination . Slice ( 4 ) , V . GetElement ( 1 ) ) ;
199- BinaryPrimitives . WriteUInt32BigEndian ( destination . Slice ( 8 ) , V . GetElement ( 2 ) ) ;
200- BinaryPrimitives . WriteUInt32BigEndian ( destination . Slice ( 12 ) , V . GetElement ( 3 ) ) ;
201- BinaryPrimitives . WriteUInt32BigEndian ( destination . Slice ( 16 ) , V . GetElement ( 4 ) ) ;
202- BinaryPrimitives . WriteUInt32BigEndian ( destination . Slice ( 20 ) , V . GetElement ( 5 ) ) ;
203- BinaryPrimitives . WriteUInt32BigEndian ( destination . Slice ( 24 ) , V . GetElement ( 6 ) ) ;
204- BinaryPrimitives . WriteUInt32BigEndian ( destination . Slice ( 28 ) , V . GetElement ( 7 ) ) ;
198+ BinaryPrimitives . WriteUInt32BigEndian ( destination [ 4 .. ] , V . GetElement ( 1 ) ) ;
199+ BinaryPrimitives . WriteUInt32BigEndian ( destination [ 8 .. ] , V . GetElement ( 2 ) ) ;
200+ BinaryPrimitives . WriteUInt32BigEndian ( destination [ 12 .. ] , V . GetElement ( 3 ) ) ;
201+ BinaryPrimitives . WriteUInt32BigEndian ( destination [ 16 .. ] , V . GetElement ( 4 ) ) ;
202+ BinaryPrimitives . WriteUInt32BigEndian ( destination [ 20 .. ] , V . GetElement ( 5 ) ) ;
203+ BinaryPrimitives . WriteUInt32BigEndian ( destination [ 24 .. ] , V . GetElement ( 6 ) ) ;
204+ BinaryPrimitives . WriteUInt32BigEndian ( destination [ 28 .. ] , V . GetElement ( 7 ) ) ;
205205 }
206206 }
207207 finally
0 commit comments