Helper for hybrid AES-RSA encryption
Project description
hybrid-rsa-aes
hybrid-rsa-aes is a helper for hybrid AES-RSA encryption.
Installation
hybrid-rsa-aes is available on PyPI. Use pip to install:
$ pip install hybrid-rsa-aes
Basic Usage
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
from hybrid_rsa_aes import HybridCipher
rsa_private_key = rsa.generate_private_key(
public_exponent=65537, key_size=2048, backend=default_backend()
)
rsa_public_key = rsa_private_key.public_key()
encrypt_message = HybridCipher().encrypt(rsa_public_key=rsa_public_key, data={"test": "demo"})
decrypt_message = HybridCipher().decrypt(
rsa_private_key=rsa_private_key, cipher_text=encrypt_message
)
assert "test" in decrypt_message and decrypt_message["test"] == "demo"
License
hybrid-rsa-aes is developed and distributed under the Apache 2.0 license.
Reporting a Security Vulnerability
See our security policy.
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
hybrid-rsa-aes-0.3.0.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for hybrid_rsa_aes-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a265f6c10292804b508c83da95c4e672a28bc866babeb7e7800dd98db18c41ff |
|
MD5 | d9ff5f29bd8726efa2f5e4971e476f00 |
|
BLAKE2b-256 | 7133dc224e09f0eb6c449f25b124a003db8f6c35518680e6bdc235de44f97809 |