I\'m having some trouble with the code below. I have a file in a temporary location which is in need of encryption, this function encrypts that data which is then stored at
Another way to read CryptoStream is to using CopyTo methord:
... using (var output = new MemoryStream()) { cryptStream.CopyTo(output); return output.ToArray(); } ...