Загрузка...

Text2Hash

Тема в разделе C# создана пользователем Checkerchin 3 фев 2018. 266 просмотров

Загрузка...
  1. Checkerchin
    Checkerchin Автор темы 3 фев 2018 178 16 апр 2017
    Программа переделывает текст в MD5 Hash

    Скачать: https://yadi.sk/d/l-vL8Kpx3S4NRR
    VT: https://www.virustotal.com/#/file/6...a04340277e48675f475075d30e1e1e95d16/detection
    Nodistribute: http://nodistribute.com/result/hXr49GLkEnimuKMIwcf

    Код:
    Код

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

    namespace MD5HASHER
    {
    public partial class Form1 : Form
    {
    static string GetMd5Hash(MD5 md5Hash, string input)
    {
    byte[] data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(input));

    StringBuilder sBuilder = new StringBuilder();

    for (int i = 0; i < data.Length; i++)
    {
    sBuilder.Append(data[i].ToString("x2"));
    }
    return sBuilder.ToString();
    }
    static bool VerifyMd5Hash(MD5 md5Hash, string input, string hash)
    {
    string hashOfInput = GetMd5Hash(md5Hash, input);

    StringComparer comparer = StringComparer.OrdinalIgnoreCase;

    if (0 == comparer.Compare(hashOfInput, hash))
    {
    return true;
    }
    else
    {
    return false;
    }
    }

    public Form1()
    {
    InitializeComponent();
    }

    private void textBox1_TextChanged(object sender, EventArgs e)
    {
    MD5 md5Hash = MD5.Create();
    textBox2.Text = GetMd5Hash(md5Hash, textBox1.Text);

    bool v = VerifyMd5Hash(md5Hash, textBox1.Text, textBox2.Text);
    }

    private void button1_Click(object sender, EventArgs e)
    {
    MD5 md5Hash = MD5.Create();
    bool v = VerifyMd5Hash(md5Hash, textBox1.Text, textBox2.Text);
    MessageBox.Show(v.ToString());
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
    timer1.Interval = 350;
    if(textBox1.Text == "")
    {
    textBox2.Text = "";
    }
    }
    }
    }

    [IMG]
    [IMG]
     
  2. EternalHuman2049
    Очередная тысячная программа по хешу...
     
  3. Checkerchin
    Checkerchin Автор темы 3 фев 2018 178 16 апр 2017
    Тут не нашел.
    [IMG]
     
Top