A custom hash package including SHA256 and SHA1
Project description
MALHasher
malhasher
is a custom Python package that provides SHA256 and SHA1 hashing functions, and a feature to match generated hash values against a dataset of hash values stored in a CSV file within the package.
Installation
To install the package, run the following command:
pip install malhasher
Features
- SHA256 Hashing: Generate SHA256 hash values for strings and files.
- SHA1 Hashing: Generate SHA1 hash values for strings and files.
- Hash Matching: Match generated hash values against a precomputed dataset of hash values stored in a CSV file.
SHA256 Hashing
Generate SHA256 hash for a given string. Generate SHA256 hash for a file.
SHA1 Hashing
Generate SHA1 hash for a given string. Generate SHA1 hash for a file.
Hash Matching
Load a dataset of hash values from a CSV file. Match generated hash values against the dataset of hash values.
Importing the Package
from malhasher import sha256, sha1, sha256_file, sha1_file, load_hash_dataset_from_csv, load_hash_dataset_from_package, match_hash
Generate SHA256 Hash for a File
from malhasher import sha256_file
file_path = "path/to/your/file"
file_hash_value = sha256_file(file_path)
print(f"SHA256 file: {file_hash_value}")
Generate SHA256 Hash for a String
from malhasher import sha256
data = b"example data"
hash_value = sha256(data)
print(f"SHA256: {hash_value}")
Generate SHA1 Hash for a File
from malhasher import sha1_file
file_path = "path/to/your/file"
file_hash_value = sha1_file(file_path)
print(f"SHA1 file: {file_hash_value}")
Generate SHA1 Hash for a String
from malhasher import sha1
data = b"example data"
hash_value = sha1(data)
print(f"SHA1: {hash_value}")
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
Built Distribution
File details
Details for the file MALHasher-0.1.tar.gz
.
File metadata
- Download URL: MALHasher-0.1.tar.gz
- Upload date:
- Size: 48.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49be63211156723c5a8ec52ffbb464ef325b0b1bd5d6a3414eb66214dfcea541 |
|
MD5 | 76fc6f98722634d7f18b79c2ab5ec468 |
|
BLAKE2b-256 | 647225a31e52bfb73a08c5e0ec9a4750017265e4cfe33f51a080c2ab706d7ae3 |
File details
Details for the file MALHasher-0.1-py3-none-any.whl
.
File metadata
- Download URL: MALHasher-0.1-py3-none-any.whl
- Upload date:
- Size: 48.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e415f3869499a5e8ab053301ff594fabc237975f0f4d33930704fed878f9b426 |
|
MD5 | a42043cc0d2db3120daf7b089a16f375 |
|
BLAKE2b-256 | cb6e20f396a87d13161abeab105c4b96e941f5dd2b676d8911756a27956b510b |