Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# calculate checksum of file

using System.IO;
using System.Security.Cryptography;

public string checkMD5(string filename)
{
    using (var md5 = MD5.Create())
    {
        using (var stream = File.OpenRead(filename))
        {
            return Encoding.Default.GetString(md5.ComputeHash(stream));
        }
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #calculate #checksum #file
ADD COMMENT
Topic
Name
5+7 =