Esempio n. 1
0
        private async void btnDecrypt_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                ChoPGPEncryptDecrypt pgp = PGPOptions.NewPGPEncryptDecrypt();
                await pgp.DecryptFileAsync(PGPDecryptFileOptions.InputFilePath, PGPDecryptFileOptions.OutputFilePath, PGPDecryptFileOptions.PrivateKeyFilePath, PGPDecryptFileOptions.PassPhrase);

                MessageBox.Show("PGP decryption successful.", Title, MessageBoxButton.OK, MessageBoxImage.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error occurred during PGP decryption. " + ex.Message, Title, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }