Example #1
0
        private static void CompleteEncryption(string filePath, string encryptedFilePath, byte[] macKey)
        {
            // Calculate and append MAC
            bool fileSigned = FileAuthentication.SignFile(encryptedFilePath, macKey);

            Utilities.ZeroArray(macKey);
            if (fileSigned == true && Globals.OverwriteFiles == true)
            {
                FileHandling.OverwriteFile(filePath, encryptedFilePath);
            }
            FileHandling.MakeFileReadOnly(encryptedFilePath);
            GetEncryptionResult(filePath, fileSigned);
        }