Skip to main content

MD5 Hash (checksum) verification tool

Project description

This is used to check files stored with the hash from the internet

  • Install with pip install md5-checksum-verifier

Functions:

from hash-tool import verifytool
verifytool.validHash('md5-hash-here')#this will return True when a hash is valid, and false if invalid (this just checks if it is in the format of an md5 hash)
verifytool.genhash('filenamehere')#this will generate and return the hash of a file
verifytool.validate('hash','original file source via the internet')

Example use:

from hash-tool import verifytool
try:
    localFile=verifytool.genhash('text.txt')#generates and stores the hash
    if verifytool.validHash(localFile) == True:
        try:
            if verifytool.validate(localFile,'https://web.org/test-original.txt') == True:
                print("File has not been tampered with")
        except:
            print("Invalid hash - file may have been tampered with")
    else:
        print("Issue generating hash")
except:
    print("Issue generating hash")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MD5 Checksum verifier-0.1.3.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

MD5_Checksum_verifier-0.1.3-py3-none-any.whl (15.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page