Skip to content

anirudhaptiwari/Document-Integrity-Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Integrity Checker

Description

This Flask-based web application allows users to check the integrity of any document. It uses the SHA-256 hashing algorithm to calculate a unique hash for each uploaded document. Later, it can compare the calculated hash of the document with the stored hash to check if the document has been modified.

Features

  • User Authentication
  • File Upload
  • Hash Generation
  • Integrity Check

Technologies Used

  • Python
  • Flask
  • PostgreSQL
  • SQLAlchemy
  • hashlib
  • HTML
  • CSS
  • JavaScript

Prerequisites

Before you begin, ensure you have the following installed on your system:

  1. Python 3.7 or higher
  2. pip (Python package installer)
  3. PostgreSQL

Installation

  1. Clone the repository:

    git clone https://github.com/anirudhaptiwari/Document-Integrity-Checker.git
  2. Navigate to the project directory:

    cd Document-Integrity-Checker
  3. Create a virtual environment:

    python -m venv venv
  4. Activate the virtual environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS and Linux:
      source venv/bin/activate
  5. Install the required dependencies:

    pip install -r requirements.txt
  6. Set up PostgreSQL:

    • Install PostgreSQL if you haven't already
    • Create a new database named 'Test':
      CREATE DATABASE Test;
    • Create a new user and grant privileges:
      CREATE USER user WITH PASSWORD 'user';
      GRANT ALL PRIVILEGES ON DATABASE Test TO user;
  7. Update the database URI: Open app.py and update the SQLALCHEMY_DATABASE_URI with your PostgreSQL credentials:

    app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://user:user@localhost/Test'

Usage

  1. Run the application:

    python app.py
  2. Access the application: Open a web browser and navigate to http://localhost:5000

  3. Log in to the application: Use the default credentials:

    • Username: admin
    • Password: admin
  4. Generate a hash:

    • Click on "Generate Hash"
    • Upload a file and provide a unique name
    • The application will generate and store the hash
  5. Check document integrity:

    • Click on "Check Integrity"
    • Upload a file and provide either the unique name or the hash value
    • The application will compare the calculated hash with the stored hash

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Troubleshooting

If you encounter any issues during setup or usage, please check the following:

  1. Ensure all dependencies are correctly installed
  2. Verify that PostgreSQL is running and the database is accessible
  3. Check that the database URI in app.py matches your PostgreSQL configuration

If problems persist, please open an issue on the GitHub repository.

About

College Mini Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published