private void button1_Click(object sender, EventArgs e) { var fileToHash = textBox1.Text; var hash = new FileHasher.HashCalculator(fileToHash).CalculateFileHash(); richTextBox1.Text = hash; }
static void Main(string[] args) { var fileToHash = args != null && args.Length > 0 ? args[0] : null; if (!string.IsNullOrEmpty(fileToHash)) { var hash = new FileHasher.HashCalculator(fileToHash).CalculateFileHash(); Console.Write(hash); } }
public string GetSingleFileInfo(string strFilePath) { string strRet = ""; // System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFile(strFilePath); System.IO.FileInfo fileinfo = new System.IO.FileInfo(assembly.Location); string strHash = new FileHasher.HashCalculator(strFilePath).CalculateFileHash(); strRet = strHash; // return(strRet); }