Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dotnet-zipdiff-utils/hashdiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HashDiff

NuGet release

Use the HashDiff tool when you need to compare the contents of two sets of checksum hashes.

Run it as a standalone executable. The tool supports three output formats: plain text, XML and HTML.

If you would like more information about checksum hashes, please see the Wikipedia article on md5sum.

Supported Platforms

  • .NET 4.5 (Desktop / Server)

Getting Started

Installation

HashDiff is available on NuGet.

Install-Package HashDiff

For the underlying class library, use HashDiff.Core.

Install-Package HashDiff.Core

Build

If you prefer, you can compile HashDiff yourself, you'll need:

  • Visual Studio 2012 (or above)

To clone it locally click the "Clone in Windows" button above or run the following git commands.

git clone https://github.com/dotnet-zipdiff-utils/hashdiff.git hashdiff
cd hashdiff
.\build.cmd

Command line arguments

hashdiff.exe --file1 foo.md5 bar.md5 [--options]

Valid options are:

--file1                       <filename> first file to compare
--file2                       <filename> second file to compare
--ignorecase                  Performs case-insensitive string comparison on the file name
--outputfile                  Name of the output file
--exitwitherrorondifference   Use an error code other than 0, if differences have been detected
--verbose                     Print detail messages

Output formats

When using the --outputfile option, the following formats are available:

  • Plain-Text
  • HTML
  • XML

For example, to output an XML file:

hashdiff.exe --file1 foo.md5 --file2 bar.md5 --outputfile diffs.xml

If the output file extension can not be determined, then the format will default to a plain-text file.

Class library usage

To compare the differences between 2 sets of MD5 checksum hashes:

var calc = new HashDiff.Core.DifferenceCalculator("foo.md5", "bar.md5");
var diff = calc.GetDifferences();

if (diff.HasDifferences())
{
	Console.WriteLine("Added: {0}", diff.Added.Count);
	Console.WriteLine("Removed: {0}", diff.Removed.Count);
	Console.WriteLine("Changed: {0}", diff.Changed.Count);
}

Contact

Have a question?

Contributing to this project

Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.

Copyright and License

Copyright © 2016 Lee Kelleher, Umbrella Inc Ltd

This project is licensed under Apache License, Version 2.0.

Please see LICENSE for further details.

About

Utility for comparing 2 sets of checksum hashes

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published