Last active
February 8, 2020 11:07
-
-
Save Refffy/424550a22ddbc891ede08abb36bdf31f to your computer and use it in GitHub Desktop.
c# project md5 sha512
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using System.Security.Cryptography; | |
namespace WindowsFormsApp1 | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
} | |
private void textBox1_TextChanged(object sender, EventArgs e) | |
{ | |
void shaM() | |
{ | |
byte[] data = new byte[512]; | |
byte[] result; | |
SHA512 sHA = new SHA512Managed(); | |
result = sHA.ComputeHash(data); | |
textBox2.Text = BitConverter.ToString(result); | |
} | |
//shaM | |
void Md5() | |
{ | |
byte[] data1 = new byte[512]; | |
MD5 a = MD5.Create(); | |
byte[] hash = a.ComputeHash(data1); | |
string hexString = BitConverter.ToString(hash).Replace("-", string.Empty).ToLower(); | |
textBox2.Text = hexString; | |
} | |
//Md5(); | |
//от Дани | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment