Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# md5 hash file

private static string GetMD5HashFromFile(string fileName)
{
	using (var md5 = MD5.Create())
	{
    	using (var stream = File.OpenRead(fileName))
        {
        	return BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", string.Empty);
       	}
	}
}
 
PREVIOUS NEXT
Tagged: #hash #file
ADD COMMENT
Topic
Name
7+6 =