Skip to main content

calculate hash or checksum

Project description

hashfile

hashfile calculates hashes or checksums in many formats.

Default algorithm is sha1. This can be changed by passing argument -a/--algorithm to hashfile, or by calling hashfile with algorithm name (ie. using symlinks).

hashfile works pretty well with big files, because always read data partially, by default 4MB of data at once (it can be changed using --max-input-read param).

Examples

simplest call

% hashfile /etc/hosts sha1: 4f53fb6efebddfdbe989f3bff980cd07ebcdc6bb /etc/hosts

specify algorithm

% hashfile -a md5 /etc/hosts md5: 71e875e9d194c18567f48cf9534ed6cf /etc/hosts

one file, many algorithms

% hashfile -a md5 -a sha1 /etc/hosts /etc/hosts md5: 71e875e9d194c18567f48cf9534ed6cf /etc/hosts sha1: 4f53fb6efebddfdbe989f3bff980cd07ebcdc6bb /etc/hosts

many files, other algorithm for each one

% hashfile -a md5 -a sha1 /etc/hosts /etc/shells md5: 71e875e9d194c18567f48cf9534ed6cf /etc/hosts sha1: e0de09cb8797a4d39f89049d74585e815a3c6ceb /etc/shells

many files, one algorithm

% hashfile -a sha256 /etc/hosts /etc/shells sha256: 48127a192d62fdcaa39f7cebd1ea5f3fe660807c8cd3a92599406d16bddc341a /etc/hosts sha256: edfd1953cce18ab14449b657fcc01ece6a43a7075bab7b451f3186b885c20998 /etc/shells

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

hashfile-1.0.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

hashfile-1.0.0-py2.py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 2 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