Calculates MD5 and SHA256 hashes for a given file
Project description
Description
Calculates MD5 and SHA256 hashes for a given file
Installation
pip install hash_calc
Usage
From command line:
python -m hash_calc [-h] --path PATH
Option | Short | Type | Default | Description |
---|---|---|---|---|
--path | -p | String | - | Path of the file to be hashed |
Programmatically:
from hash_calc.HashCalc import HashCalc
pathToFile = "/path/to/file/test.txt
hashCalc = HashCalc(pathToFile)
print(hashCalc.md5)
print(hashCalc.sha256)
Example
python -m hash_calc -p test.txt
Creates the follwing result:
##############################################################################################
Hash Calc by 5f0
Calculates MD5 and SHA256 hashes for a given file
Current working directory: /path/to/hash_calc
Investigated file: test.txt
MD5 Hash: 265e08df10ed62d756e5e0bb6fadd69c
SHA256 Hash: 1675aa3766017a42980e686132eff094ba789bc3dc44de3e53f2fb05a7a513ff
Datetime: 01/01/1970 10:20:30
##############################################################################################
Execution Time: 0.003022 sec
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hash_calc-1.0.0.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for hash_calc-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeea8a1c4a939157d83012266256663f485c3f12b9f7952220b92f2f58e9bc77 |
|
MD5 | 02d4107a8c0a1bdc9f82111e578ed7d4 |
|
BLAKE2b-256 | fae10bfa4f25411e1563d314cc2c0d7bb9df31531c105a4ed19a216509ff0abd |