private void button11_Click(object sender, EventArgs e)//SHA1文字 { string SHA1_Message = richTextBox11.Text.Trim(); if (SHA1_Message == null || SHA1_Message == "") { return; } string[] sha = MySHA.GetSHAHash(SHA1_Message); textBox6.Text = sha[0]; textBox10.Text = sha[1]; textBox11.Text = sha[2]; textBox12.Text = sha[3]; }
private void button12_Click(object sender, EventArgs e)//SHA1文件 { string FilePath = textBox5.Text.Trim(); if (FilePath == null || FilePath == "") { return; } if (File.Exists(FilePath) != true) { MessageBox.Show("文件不存在"); return; } string[] sha = MySHA.GetSHAHashFromFile(FilePath); textBox6.Text = sha[0]; textBox10.Text = sha[1]; textBox11.Text = sha[2]; textBox12.Text = sha[3]; }