using System;
using System.Windows.Forms;
using System.Security.Cryptography;

namespace _15_2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public static string GetMD5Hash(string input)
        {
            MD5 md5 = MD5.Create();
            byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(input);
            byte[] hashBytes = md5.ComputeHash(inputBytes);
            string output = string.Empty;
            foreach (byte item in hashBytes)
                output += item.ToString("X2");
            return output;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox2.Text = GetMD5Hash(textBox1.Text);
        }
    }
}