static void Main(string[] args) { string res = MultipleGamma.Encrypt("Привет1 мир"); Console.WriteLine(res); Console.WriteLine(MultipleGamma.Decrypt(res, MultipleGamma.gammas)); Console.ReadKey(); }
private void GammaDecryptButton_Click(object sender, RoutedEventArgs e) { if (GammaEncryptedText.Content.ToString().Length > 0) { GammaDecryptedText.Content = ""; GammaDecryptedText.Content = MultipleGamma.Decrypt(GammaEncryptedText.Content.ToString(), MultipleGamma.gammas); } else { MessageBox.Show("Текст для дешифровки отсутсвует"); } }
private void GammaEncryptButton_Click(object sender, RoutedEventArgs e) { if (TextToEncodeBox.Text.Length > 0) { GammaEncryptedText.Content = ""; GammaDecryptedText.Content = ""; GammaEncryptedText.Content = MultipleGamma.Encrypt(TextToEncodeBox.Text); } else { MessageBox.Show("Введите тескт для шифрования"); } }