/FileHashValueGenerator

A Java Swing Application used in order to calculate the unique Hash Value for a user-specified file. Features options for both MD and SHA Hashing Algorithm Formulas.

Primary LanguageJava

Cryptographic Hash Value Generator

File Hash Value Generator Logo

Java License: MIT Last Commit Repo Size Open Issues

A Java Swing desktop application that allows users to generate the unique hash value of any file on their machine. It supports multiple hashing algorithms and provides a clean GUI for easy use, complete with error handling and informative warnings.


πŸ“‘ Table of Contents


πŸ“– Overview

Hashing algorithms calculate a fixed-size hexadecimal representation of file contents. This application lets you:

  • Select from a variety of hash algorithms (MD2, MD5, SHA-1, SHA-224, SHA-256, SHA-348, SHA-512)
  • Compute the unique hash value of any file
  • Compare results by switching algorithms
  • Get detailed error messages for invalid inputs

✨ Features

  • Multiple Algorithms – Supports MD2, MD5, SHA-1, SHA-224, SHA-256, SHA-348, and SHA-512
  • Cross-File Compatibility – Works with any file type
  • Error & Warning Handling – Explains reasons for failed computations
  • Lightweight & Portable – Execute with a simple JAR; no heavy setup required
  • User-Friendly Interface – Built with Java Swing

πŸš€ Getting Started

Prerequisites

  • Java JDK 8+
  • Apache NetBeans 11.2 (recommended) or another Java IDE

Installation

git clone https://github.com/tmfontan/FileHashValueGenerator.git

Note: This application was designed and tested using Apache NetBeans 11.2.


⚑ Usage

  1. Launch the application.
  2. Select a file from your system.
  3. Choose the desired hashing algorithm.
  4. Click Compute Hash.
  5. View the resulting hash value in the display area.

πŸ“Έ Screenshots

Below are screenshots showcasing the tool’s interface and functionality:

Main UI Divider Algorithm Options Divider Hash Computation Divider Results Screen Divider Warning Messages Divider Error Handling Divider SHA Hash Example Divider Extra Screenshot Divider Advanced View Divider MD5 Example Divider SHA-256 Example Divider SHA-512 Example Divider Final Example


πŸ› οΈ Class Structure

The application is composed of the following classes:

  • GUI – Creates the main window, file chooser, hash result display, and user controls.
  • HashCalculator – Implements different hashing algorithms using MessageDigest.
  • WarningMessageFrame – Displays pop-ups for missing file selection or invalid operations.
  • ErrorMessageFrame – Handles computation errors with clear messages.
  • ResultHandler – Manages and formats output for the GUI.

πŸ—ΊοΈ Roadmap

Planned enhancements and future improvements:

  • Add support for additional algorithms (e.g., Blake2, SHA-3)
  • Implement drag-and-drop file selection
  • Provide batch hashing for multiple files
  • Add export functionality to save hash values
  • Include unit tests for better reliability

🀝 Contributing

Contributions are welcome! To get started:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-name.
  3. Make your changes and commit: git commit -m \"Add feature\".
  4. Push to your branch: git push origin feature-name.
  5. Submit a pull request.

Please ensure your contributions align with the project’s coding standards and include updates to documentation where necessary.


πŸ“œ License

This project is licensed under the MIT License.