private async void btnEncryptAndSign_Click(object sender, RoutedEventArgs e) { try { ChoPGPEncryptDecrypt pgp = PGPOptions.NewPGPEncryptDecrypt(); await pgp.EncryptFileAndSignAsync(PGPEncryptFileOptions.InputFilePath, PGPEncryptFileOptions.OutputFilePath, PGPEncryptFileOptions.PublicKeyFilePath, PGPEncryptFileOptions.PrivateKeyFilePath, PGPEncryptFileOptions.PassPhrase, PGPEncryptFileOptions.Armor, PGPEncryptFileOptions.IntegrityCheck); MessageBox.Show("PGP Encryption successful.", Title, MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { MessageBox.Show("Error occurred during PGP encryption. " + ex.Message, Title, MessageBoxButton.OK, MessageBoxImage.Error); } }