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")
Metadata
Release files for MD5-Checksum-verifier 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| MD5 Checksum verifier-0.1.3.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| MD5_Checksum_verifier-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / MD5 Checksum verifier-0.1.3.tar.gz
| Download URL | MD5 Checksum verifier-0.1.3.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64152e9a57611c551477b7a6ba49a6fbf1c57882f4613b0bbc44d72aa80a56d5
|
|
BLAKE2b-256 checksum How to use checksums |
3eb39a37b7925d0d8165b6076f13ea7a1b139ec3df215e35c38351fe47c954d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / MD5_Checksum_verifier-0.1.3-py3-none-any.whl
| Download URL | MD5_Checksum_verifier-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30709494e9aab8662e397e4b9993d245ede963723aadbf8e90727d7cf7e4ff76
|
|
BLAKE2b-256 checksum How to use checksums |
fd20e8628b38da3cfc063f5b3f0803c6b87fce1d569731d1af74b4c6788cd1e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|