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.5.0.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file hybrid-rsa-aes-0.5.0.tar.gz
.
File metadata
- Download URL: hybrid-rsa-aes-0.5.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a6a240185a92a71d6bc1db8ee9a7529a79b34e78c580cc33fd36b4cc94b0eb2 |
|
MD5 | b5ee28d334ac60e4a7f3f777652d68ef |
|
BLAKE2b-256 | 2fb7b5ead02879a9522ea958b92930d152735b746480d3d8c314a030e1ad212d |
File details
Details for the file hybrid_rsa_aes-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: hybrid_rsa_aes-0.5.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e47ad2bc3ffe33919826474980026c42e7a79dbeca507c17b0cea66706150655 |
|
MD5 | 081751c4945ba0aac8feb1e44db1e009 |
|
BLAKE2b-256 | efa1675dedbd7b46c804fa475d777a396d7a3185d49a82b3651a0ba9f15bb505 |