A lightweight, open-source Python library for modeling cryptographic algorithms.
CryptoModel is a cross-platform library designed to provide a simple interface for common cryptographic functions. It is built with flexibility and extensibility in mind, making it ideal for a wide range of applications, from academic research to real-world deployment.
- Symmetric and asymmetric encryption
- Hash functions (SHA-256, SHA-512, etc.)
- Secure key generation and management
- Compatibility with multiple cryptographic libraries
pip install crypto-modelfrom crypto_model import encrypt, decrypt, hash_data
# Generate a 256-bit key
key = encrypt.generate_key(256)
# Encrypt data using the generated key
encrypted_data = encrypt.encrypt_data(key, "Hello, World!")
# Decrypt the data
decrypted_data = decrypt.decrypt_data(key, encrypted_data)
# Hash a piece of data
hash_value = hash_data.hash_data("Hello, World!")
print(decrypted_data) # prints: Hello, World!
print(hash_value) # prints: <hash value>