Ejemplo n.º 1
0
        private static bool AreFilesMatched(string file1, string file2)
        {
            var hash1 = HasherFactory.GetHasher(file1).GetHashForComparison(file1);
            var hash2 = HasherFactory.GetHasher(file2).GetHashForComparison(file2);

            return(hash1 == hash2);
        }
Ejemplo n.º 2
0
        public void Convert(string sourcePath, string targetPath)
        {
            var hasher = HasherFactory.CreateHasher(sourcePath);

            File.WriteAllText(targetPath, hasher.GetHashForComparison(sourcePath));
        }