Decrease memory consumption when encrypting files c#
问题 My encryption app is using to much memory and it simply can't handle large files, how can I optimize my code for handling large files? I am using the code below to convert the file to base64 (increasing the file size dramatically) Console.Write("Enter File Path: "); docPath = Console.ReadLine(); extension = docPath.Substring(docPath.IndexOf(".")).Trim(); byte[] binarydata = File.ReadAllBytes(docPath); text = System.Convert.ToBase64String(binarydata, 0, binarydata.Length); var Encrypted =