ACR_ServerCommunicator.ModuleContentPatcher.GetFileChecksum C# (CSharp) Method

GetFileChecksum() private static method

Get the MD5 checksum of a file as a lowercased hex string.
private static GetFileChecksum ( string FilePath, MD5CryptoServiceProvider MD5Csp ) : string
FilePath string Supplies the path to the file.
MD5Csp System.Security.Cryptography.MD5CryptoServiceProvider Supplies the MD5 crypto context block.
return string
        private static string GetFileChecksum(string FilePath, MD5CryptoServiceProvider MD5Csp)
        {
            byte[] Hash = MD5Csp.ComputeHash(File.ReadAllBytes(FilePath));
            StringBuilder HashString = new StringBuilder();

            for (int i = 0; i < Hash.Length; i += 1)
                HashString.Append(Hash[i].ToString("x2"));

            return HashString.ToString();
        }