Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Security.Cryptography;
- using System.Text;
- using System.Windows.Forms;
- namespace md5_1
- {
- public partial class FMD5 : Form
- {
- public FMD5()
- {
- InitializeComponent();
- }
- public string ComputeStringMD5Hash(string instr)
- {
- string strHash = string.Empty;
- foreach (byte b in new MD5CryptoServiceProvider().ComputeHash(Encoding.Default.GetBytes(instr)))
- {
- strHash += b.ToString("X2");
- }
- return strHash.ToLower();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- label1.Text = ComputeStringMD5Hash(textBox1.Text);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement