checkHash

raw JSON →
1.0.1 verified Fri May 01 auth: no python

A Python package to check if a string is a valid hash, supporting multiple hash algorithms (MD5, SHA1, SHA256, SHA512, RipeMD, CRC, Adler32, Whirlpool, etc.). Version 1.0.1 released November 2022. Low maintenance cadence.

pip install checkhash
error ModuleNotFoundError: No module named 'checkHash'
cause Trying to import 'checkHash' directly (camelCase) rather than the package name 'checkhash'.
fix
Use: import checkhash
error ImportError: cannot import name 'checkhash' from 'checkhash'
cause Confusion between package name and function name. The function is checkHash, not checkhash.
fix
Use: from checkhash import checkHash
gotcha Package name on PyPI is 'checkhash' (all lowercase) but import uses camelCase: 'checkHash' (capital H).
fix Use 'from checkhash import checkHash' not 'import checkHash'.
gotcha The checkHash function returns True for any valid hash (multiple algorithms). To check a specific algorithm, import that algorithm's function directly.
fix Use e.g., 'from checkhash import md5' and call md5(string).

Invalid release date detected, using current date.

from checkhash import checkHash

result = checkHash('d41d8cd98f00b204e9800998ecf8427e')
print(result)  # True or False

# Specify algorithm
from checkhash import md5, sha1
print(md5('d41d8cd98f00b204e9800998ecf8427e'))  # True
print(sha1('da39a3ee5e6b4b0d3255bfef95601890afd80709'))  # True