private static string GetFileMd5(this string filePath) { Guards.ThrowIfFileNotFound(filePath); using (var fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read)) { return(BitConverter.ToString(Md5Algorithm.ComputeHash(fileStream)).ToLower().Replace("-", string.Empty)); } }