|
-
July 1st, 2009, 02:39 AM
#4
Re: CryptoStream To MemoryStream problem
I think that it is because you cannot simply reset crypto streams by seeking to begining of the underlying memory stream, because bytes in cryptostream are not independant. As far as I know, byte on position n-1 is part of computation of byte on position n, so I think by spliting the stream to chunks and decrypting each chunk separately as I do it, you lost infromation vital for decryption.
In other words, the solution with opening the streams in each iteration is the only one. Or you could use a single stream for all encrypted object and maintain separated metada which would describe where each object in the stream starts and where ends.
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|