Beispiel #1
0
        static void Main(string[] args)
        {
            string   filepath = null;
            FileInfo fileinfo;

            Console.Write("Please enter the path to the file: ");
            filepath = Console.ReadLine();

            try
            {
                fileinfo = FileCrypto.GetFileInfo(filepath);
                if (fileinfo.Encrypted)
                {
                    Console.WriteLine("The file \"" + filepath + "\" is encrypted using key " + fileinfo.KeyId + ".");
                }
                else
                {
                    Console.WriteLine("The file \"" + filepath + "\" is not encrypted.");
                }
            }
            catch (SdkException e)
            {
                Console.WriteLine(e);
            }

            Console.Write("\nPress Enter to continue...");
            Console.ReadKey();
        }