Closed avnet78 closed 2 years ago
Hi, this is probably because you're holding your output stream in memory and it's using more than you have available.
The EncryptStream method is reasonably efficent so the issue is probably with how you're handling the output stream. See the below test for an example of how stream handling can work.
Thank you @mattosaurus
I read data from a 2GB file into a memory stream and why I try to encrypt the stream a System.OutOfMemoryException exception is being thrown.
Here's my code:
Please advise.