Okay, here is my code:
The first part works fine "msNewStream.Write(msStream.ToArray, 0, msStream.Length - (hashsize * 8))"
The second one always throws an exception of:
Offset and Length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
Anyone have any ideas?
Thanks, Chester
Code:
Dim msNewStream As New MemoryStream
Dim msstreamhass As New MemoryStream
msNewStream.Write(msStream.ToArray, 0, msStream.Length - (hashsize * 8))
Dim intP As Integer = msStream.Length - (hashsize * 8)
intP = msStream.Length
msStream.Position = 0
msstreamhass.Write(msStream.ToArray, (msStream.Length - 159), msStream.Length)
The first part works fine "msNewStream.Write(msStream.ToArray, 0, msStream.Length - (hashsize * 8))"
The second one always throws an exception of:
Offset and Length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
Anyone have any ideas?
Thanks, Chester