Skip to main content

Check and get file hashes (using any algorithm)

Project description

sha

Check and get file hashes (using any algorithm)

Installation

$ pip install sha

API

check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])

Asynchronously check that fileName has a "hash" of expected. The callback will be called with either null or an error (indicating that they did not match).

Options:

  • algorithm: defaults to sha1 and can be any of the algorithms supported by crypto.createHash

get(fileName, [options,] cb) / getSync(filename, [options])

Asynchronously get the "hash" of fileName. The callback will be called with an optional error object and the (lower cased) hex digest of the hash.

Options:

  • algorithm: defaults to sha1 and can be any of the algorithms supported by crypto.createHash

stream(expected, [options])

Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:

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

entangle-0.0.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

entangle-0.0.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file entangle-0.0.0.tar.gz.

File metadata

  • Download URL: entangle-0.0.0.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for entangle-0.0.0.tar.gz
Algorithm Hash digest
SHA256 603c2e8cba2946ff0e2c2f2bfd95d8527fe65055f036ff28e17c3979f7df4ba7
MD5 394ea3fcc09c43a596f99647932cd290
BLAKE2b-256 ab37ed385dc8f70ce1db6af7ee304fbd5df03bb5310e0a607ccf1419bc80e2a2

See more details on using hashes here.

File details

Details for the file entangle-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: entangle-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for entangle-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbef518a463ff92c8d7f75116fd2a235cbfd78d679a619aa971bf2ad4bfc3734
MD5 352d2207c5fefe6e444f6d0abf896af1
BLAKE2b-256 61cb75916fac3df26aaa4c19065ebbcb638ce5d4858e9f35d60e61f8ef989442

See more details on using hashes here.

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