Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

C# Calculate MD5 Checksum For A File

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

static string CalculateMD5(string filename)
{
    using (var md5 = MD5.Create())
    {
        using (var stream = File.OpenRead(filename))
        {
            var hash = md5.ComputeHash(stream);
            return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# list keyvaluepair update value 
Csharp :: upload a file selenium c# 
Csharp :: clickable table row asp.net core 
Csharp :: regular expression alphanumeric dash space c# 
Csharp :: telerik mvc grid column with icon 
Csharp :: automapper c# initialize error 
Csharp :: what is float in c# 
Csharp :: save position unity 
Csharp :: eventsource web api c# 
Csharp :: binding on button c# 
Csharp :: change color unity over time 
Csharp :: c# int to string date conversion 
Csharp :: c# integer part of float 
Csharp :: set request size c# 
Csharp :: cant find desktop and documents folder macOs 
Csharp :: c# xunit theory classdata model 
Csharp :: c# multiplicate char 
Csharp :: recorrer list c# 
Csharp :: 405 - HTTP verb used to access this page is not allowed 
Csharp :: DataGridView ComboBox column selection changed event 
Csharp :: Palindromic substrings 
Csharp :: datagridview column index 
Csharp :: gql query with parameters 
Csharp :: c# datagridview change column alignment 
Csharp :: ef core add OnModelCreating foreign key 
Csharp :: c# 2d arrays 
Csharp :: c# array lenght 
Csharp :: c# sort llist 
Csharp :: adding to a dictionary class c# 
Csharp :: linq while loop in c# 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =