Skip to main content

TrazHash is a Python library designed to hash data strings, called a System-Dependent Hash, or a SDHASH, or file contents using a combination of your system's specific values and cryptographic hash functions.

Project description

TrazHash

Description

TrazHash is a Python library designed to hash data strings, called a System-Dependent Hash, or a SDHASH, or file contents using a combination of your system's specific values and cryptographic hash functions. By incorporating system-specific values such as the system name, node name, release, version, machine, processor, and hostname into the hashing process, the library produces hashes that are tied to the particular system on which the hashing was performed. This can be useful for generating unique identifiers, checksums, or verifying the integrity and origin of data.

The library supports multiple levels of hashing (e.g., hash inside another hash) and allows users to specify the desired cryptographic hash functions (e.g., SHA256, SHA512) for each level.

TrazHash is easy to use, highly configurable, and can be integrated into various Python projects including security applications, data verification tools, and more.

TrazHash

Features

  • System-specific Hashing: Combines data strings or file contents with system-specific values before hashing, ensuring that hashes are unique to the system.
  • Multi-level Hashing: Supports hashing data inside another hash, which can be used for additional security and integrity assurance.
  • Configurable Hash Algorithms: Allows users to specify which cryptographic hash functions to use at each level.
  • File Hashing: Conveniently hash the contents of a file.
  • Data Verification: Includes a function for verifying if the hash of a given data string matches a provided hash.
  • Custom Exceptions: Provides custom exceptions for error handling, particularly when reading files.

Use Cases

  • Security Applications: Produce system-tied hashes for secure authentication or encryption processes.
  • Data Integrity Checks: Verify the integrity and origin of data by comparing hashes.
  • Unique Identifier Generation: Generate unique identifiers for data that are also tied to the system.
  • Checksum Generation: Create checksums for files which are unique to the system for verification purposes.

Example Use Case

TrazHash can be particularly useful in scenarios where you want to ensure that certain data or files have not been altered or tampered with, and also verify that they originated from a specific system. For instance, in a network of devices where each device generates data files, you can use TrazHash to generate a checksum for each file which includes system-specific values. When collecting data from the devices, you can verify not only that the file has not been altered (by comparing checksums) but also confirm which device the data originated from.

Disclaimer

Please note that while the library provides cryptographic hash functions, it should not be solely relied upon for security-critical applications without additional safeguards and considerations of the security context in which it is used.

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

trazhash-0.1.3.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file trazhash-0.1.3.tar.gz.

File metadata

  • Download URL: trazhash-0.1.3.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for trazhash-0.1.3.tar.gz
Algorithm Hash digest
SHA256 83b8266fa0f868125fa8891ad0c8820d0ef38016111e8a1b781e6e7fe15cbf71
MD5 67c54aec174526f6ed6da1e541d6e335
BLAKE2b-256 2eae02eecd52c3f129815cac81f01b1bd4ad8aed316b95c16ecf241db5440eb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page