Chacha20Poly1305
Project description
Simple pure-python chacha20-poly1305 implementation based on tlslite-ng code. Designed to be compatible with Cryptography API.
import os
from chacha20poly1305 import ChaCha20Poly1305
key = os.urandom(32)
cip = ChaCha20Poly1305(key)
nonce = os.urandom(12)
ciphertext = cip.encrypt(nonce, b'test')
plaintext = cip.decrypt(nonce, ciphertext)
print(plaintext)
Pip
pip install chacha20poly1305
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 chacha20poly1305-0.0.2.tar.gz
.
File metadata
- Download URL: chacha20poly1305-0.0.2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c4e4b981ffa6aec7b58d50ebbef9b0ce747d282b8d99843586cb7ba74dad382 |
|
MD5 | 2dd301e09233bb4773d089db00008796 |
|
BLAKE2b-256 | a9ee165e8fdfa9e03cba1a1215f173cda4f6e060ad9deb2dab0ae1a5cd90cde7 |
File details
Details for the file chacha20poly1305-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: chacha20poly1305-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2399ff8fc1cb9a80d1ca85d855970a3508fd3a93f96e546a223a778cc0d40f14 |
|
MD5 | 927d76129d9dfcdc0f9c68911f6cc712 |
|
BLAKE2b-256 | 0e0a4a263a94aed4b32e723132ae2bbef8c6de4e3a260bd2ce4512f3fde8efcd |