Introducing Hashmatch

Categories Cryptography, Dev Ops, Golang, Infrastructure
hashmatch cli

Hey everyone, This is a post written to introduce a new tool I have been writing called hashmatch. Hashmatch is a simple cli tool written in Go which has the simple purpose to compare two files by a hashing algorithm of your choice be it md5sum, sha1, sha256 or crc32. The purpose of this CLI tool can be to check for file tampering or to quickly get the hash value of a given file for forensics. The tool is powered by the cobra library for building CLIs. It follows the simple approach of traversing a directory and returning an array of hashes for files present. Below is the core logic for computing the hashes.

Scope for improvement:

  • Add test cases 🙈
  • support different output formats csv, json etc. (json support was recently added)
  • add support to browse remote directories via ssh/ftp.
  • create a website explaining the tool in detail.

The cli tool was inspired by the popular inbuilt md5sum command, which doesn’t have the ability to traverse directories or perform matches. hashmatch provides the same performance with support for additional algorithms as well.