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
chacha20poly1305-0.0.2.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for chacha20poly1305-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2399ff8fc1cb9a80d1ca85d855970a3508fd3a93f96e546a223a778cc0d40f14 |
|
MD5 | 927d76129d9dfcdc0f9c68911f6cc712 |
|
BLAKE2b-256 | 0e0a4a263a94aed4b32e723132ae2bbef8c6de4e3a260bd2ce4512f3fde8efcd |