private void textBox1_TextChanged(object sender, TextChangedEventArgs e) { if (textBox1.Text != "" && textBox1.Text != "ХЕШ") { String hash = EMDE5.Create(textBox.Text).ToUpper(); if (textBox1.Text != hash) { textBox1.Background = Brushes.Red; } else { textBox1.Background = Brushes.White; } } else { textBox1.Background = Brushes.White; } }
//1 private void button_Click_1(object sender, RoutedEventArgs e) { textBox1.Text = EMDE5.Create(textBox.Text).ToUpper(); }