Ejemplo n.º 1
0
 public static string ComputeFileHash(string filePath)
 {
     using (var fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
     {
         IEnumerable <string> enumerable = new xxHash(Seed).ComputeHash(fileStream).Select(b => b.ToString("X2")).Reverse();
         return(string.Join("", enumerable.ToArray()).ToLower().TrimStart('0'));
     }
 }