Skip to content

Add MD5 hash algorithm support#54

Merged
dibu28 merged 1 commit intomainfrom
add-md5-hash-support
Sep 16, 2025
Merged

Add MD5 hash algorithm support#54
dibu28 merged 1 commit intomainfrom
add-md5-hash-support

Conversation

@dibu28
Copy link
Owner

@dibu28 dibu28 commented Sep 16, 2025

Summary

This PR adds MD5 hash algorithm support to the ChecksumFolder application.

Changes Made

  • Added MD5 import: Added crypto/md5 import to main.go
  • Updated flag help: Updated the -hash flag help text to include md5 as an available option
  • Added MD5 case: Added md5 case to the hashFile function switch statement
  • Updated documentation: Updated README.md to document MD5 support in the list of available algorithms

Testing

  • ✅ Built the application successfully with Go 1.23.8
  • ✅ Tested MD5 hash generation on sample files
  • ✅ Verified MD5 hashes match system md5sum output
  • ✅ Tested verification functionality with MD5 hashes
  • ✅ Tested JSON output format with MD5
  • ✅ Confirmed existing SHA1 functionality still works correctly
  • ✅ Verified help output shows MD5 in the list of supported algorithms

Usage

Users can now use MD5 hashing with:

CheckSumFolder -dir /path/to/dir -hash md5

MD5 is now available alongside the existing hash algorithms: md5, sha1, sha256, blake2b, blake3, xxhash, xxh3, xxh128, t1ha1, t1ha2, highway64, highway128, highway256, wyhash, and rapidhash.

Backward Compatibility

This change is fully backward compatible. All existing functionality remains unchanged, and MD5 is simply added as an additional option.

@dibu28 can click here to continue refining the PR

- Add crypto/md5 import to main.go
- Update hash algorithm flag help text to include MD5
- Add MD5 case to hashFile function switch statement
- Update README.md to document MD5 support
- MD5 is now available as a hash option alongside existing algorithms
@dibu28 dibu28 marked this pull request as ready for review September 16, 2025 19:18
@dibu28 dibu28 merged commit f27b928 into main Sep 16, 2025
@dibu28 dibu28 deleted the add-md5-hash-support branch September 16, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants