Hashium is a powerful and highly secure Python hashing and encryption library. It combines traditional and modern cryptographic algorithms including SHA, HMAC, PBKDF2, Argon2, AES, RSA, and a custom ultra-secure hybrid algorithm developed specifically for enhanced protection.
- Basic & Salted SHA-256 Hashing
- PBKDF2 with HMAC-SHA256
- Argon2 Hashing and Verification
- HMAC using SHA-256
- AES-256 Encryption and Decryption (EAX Mode)
- RSA Key Generation, Signing, and Verification
- File Hashing with SHA-256
- Ultra-Secure 768+ Bit Custom Hash Algorithm
- Clean and readable code
- Python 3.8+ compatible
Hashium is a powerful and flexible hashing and encryption library designed for a wide range of real-world applications. Below are some practical use cases where Hashium can be effectively utilized:
Securely hash and verify user passwords using algorithms like PBKDF2, Argon2, and HMAC-SHA256.
- Use Case: Login forms, registration systems, and authentication APIs.
- Benefit: Protects against brute-force and rainbow table attacks.
Generate secure, high-entropy tokens for sessions, password resets, and API authentication.
- Use Case: One-time links, session tokens, API keys.
- Benefit: Unpredictable and tamper-proof tokens using hybrid hashing.
Safely encrypt sensitive data using AES and RSA encryption.
- Use Case: Storing confidential user data, configuration files, or local secrets.
- Benefit: Ensures data confidentiality and security both locally and in transit.
Check whether files have been tampered with using hash comparison.
- Use Case: Software downloads, file uploads, backup systems.
- Benefit: Detects unauthorized changes or corruption.
Create and validate secure license keys using hybrid and custom hash algorithms.
- Use Case: Offline/online software activation, subscription verification.
- Benefit: Prevents license forgery or tampering.
Learn and teach cryptography with clear, well-structured Python implementations of modern algorithms.
- Use Case: Schools, colleges, bootcamps, or personal learning.
- Benefit: Easy to understand and modify for academic use.
Encrypt files or user credentials within local Python or mobile-based applications.
- Use Case: Secure note apps, local password managers, personal data lockers.
- Benefit: Provides lightweight and customizable encryption for offline apps.
Implement security in embedded or resource-constrained systems using simplified hashing or encryption.
- Use Case: Edge devices, sensor data integrity, device authentication.
- Benefit: Lightweight and portable cryptographic logic.
Hashium bridges simplicity and power, making it ideal for developers, startups, educators, and security-conscious applications.
pip install hashium
Or clone the repository manually:
git clone https://github.com/DeveloperKR123/Hashium.git
cd Hashium
pip install -r requirements.txt
- Python 3.8+
- argon2-cffi
- pycryptodome
Install dependencies:
pip install argon2-cffi pycryptodome
from hashium import Hashium
hashium = Hashium()
# Basic SHA-256 Hash
print(hashium.hashium_basic("mypassword"))
# Salted Hash
print(hashium.hashium_salted("mypassword"))
# PBKDF2 Hash and Verification
hashed = hashium.hashium_pbkdf2("mypassword")
print(hashium.verify_pbkdf2("mypassword", hashed))
# Argon2 Hash and Verify
argon_hash = hashium.hashium_argon2("mypassword")
print(hashium.verify_argon2("mypassword", argon_hash))
# AES Encryption / Decryption
encrypted = hashium.encrypt_data("mypassword")
print(hashium.decrypt_data(encrypted))
# RSA Key Pair
private_key, public_key = hashium.generate_rsa_keys()
signature = hashium.sign_data("secure message", private_key)
print(hashium.verify_signature("secure message", signature, public_key))
# Ultra Secure Hash
print(hashium.hashium_ultra_secure("mypassword"))
hashium_basic(data)
hashium_salted(data)
hashium_pbkdf2(password)
verify_pbkdf2(password, stored_hash)
hashium_hmac(key, data)
hashium_argon2(password)
verify_argon2(password, stored_hash)
encrypt_data(data)
decrypt_data(encrypted_data)
hash_file(file_path)
generate_rsa_keys()
sign_data(data, private_key)
verify_signature(data, signature, public_key)
hashium_ultra_secure(data, pepper='Hashium2025Ultra')
See example.py
in the repository to test all functionalities.
We welcome contributions! Please read CONTRIBUTING.md before submitting a pull request.
This project is licensed under the MIT License – see the LICENSE file for details.
Prog. Kanishk Raj (ProgrammerKR)
GitHub | Creator of Hashium, Hashium
Hashium is intended for educational and research purposes. For mission-critical systems, it's advised to follow vetted industry cryptographic standards and seek professional security audits.